Topic: DatePicker: Date is not correctly updated with Steppers
dimitribocquet pro asked 6 years ago
Hi,
I'm using the Datepicker with Steppers and a custom locale, and when I switch to another step, the Datepicker field doesn't work anymore.
Moreover, I tried to manually update the value, it doesn't work neither. I have to do that, with this ugly setTimeout :
switch (this.activeStep) {
case 2:
this.startAtPicker.addLocale(app.locales);
setTimeout(() => {
this.startAtPicker.writeValue(this.modalForm.get('harvest.start_at').value);
}, 1);
break;
case 3:
this.finishAtPicker.addLocale(app.locales);
setTimeout(() => {
this.finishAtPicker.writeValue(this.modalForm.get('harvest.finish_at').value);
}, 1);
break;
}
Please could you fix that?
Arkadiusz Idzikowski staff answered 6 years ago
Hello,
Thank you for reporting this problem, we will take a closer look at it.
By 'Datepicker field doesn't work anymore' you mean that the picker frame doesn't open at all or that locales are not updated?
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Pro
- Premium support: No
- Technology: MDB Angular
- MDB Version: 6.2.3
- Device: Mac
- Browser: Chrome
- OS: OSX
- Provided sample code: Yes
- Provided link: No