0
 <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 mb-2">
                    <mat-form-field class="example-full-width" appearance="outline">
                    <mat-label>Follow up Consultation</mat-label>
                    <input matInput [matDatepicker]="picker"  
                    formControlName="consultationDate">
                    <mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
                    <mat-datepicker #picker></mat-datepicker>
                    
                    </mat-form-field>

This is my code, I am working on an angular app related to medical. When I pick a date from the calendar icon, it picks the exact date. But when I click on proceed order button, the date I see is one day back whatever date I select. How to solve this Issue

1 Answer 1

0

Everything you are doing for implementing the datepicker looks alright.

Not getting the exact date/datetime is a common misconception when working with dates. The problem might be coming from the way you filter out the incoming date into your component/service.

This question has already been answered. Hopefully you can find the answer here: https://stackoverflow.com/a/66105308/8681915

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.