When I select a date I see the correct date in the field but, when I save, the datepicker send the day before the date I have selected ( 3 hours offset ) i am using angular
This worked for me:
const date = new Date(dateFromDatepicker);
date.toLocaleString(); // displays the correct date that was chosen in the datepicker
I'm using reactive forms. dateFromDatepicker is the value I got from the Angular material datepicker formControl.
Source: https://github.com/angular-ui/ui-date/issues/88