Open Mokette opened 4 years ago
I think i find why i didn't have toe correct behaviour,
it's because i use (click)="pickerStartDate.open();"
to open the calendar and not a <mat-datepicker-toggle matSuffix [for]="pickerStartDateMeeting"></mat-datepicker-toggle>
So i guess the pickerStartDate.open()
don't do the same action than the mat-datepicker-toggle
Is there a way to have the correct behaviour without using the mat-datepicker-toggle
?
Regards,
Same problem with angular 10.1. picker.open() does not set the last selected value.
i found a solution
inputClick(datetimePicker: NgxMatDatetimePicker<any>) {
if (this.form.get('field').value)
datetimePicker._selected = this.form.get('field').value;
datetimePicker.open();
}
Hello, i've just noticed a strange behaviour when i pick a date in the datetime-picker component.
The component is init with
DateX
, i click on the input i pick aDateY
, theDateY
is correctly shown inside the input but when i click again to open the datetime-picker, the selected date on the calendar isDateX
I use it that way :
package.json :
i configure it to use moment format in my components :
with my custom format :
and in the html part :
the
checkDate()
function doesn't modify the variables only check the duration.Thanks for you help if you can provide some :) Stay available for further informations if needed.
Regards,