Topic: How to update TimePicker programmatically
Expected behavior How to update TimePicker value programmatically?
Actual behavior
If I use code below nothing happend even that console.log
in render
method shows valid hour. TimePicker still shows 0
Resources (screenshots, code snippets etc.)
<MDBTimePicker id="shiftStart"
hoursFormat={24}
autoSwitch={true}
hours={shiftTypeForm.id ? parseInt(moment(shiftTypeForm.shiftStart, 'HH:mm').format('HH'), 10) : 0}
minutes={shiftTypeForm.id ? parseInt(moment(shiftTypeForm.shiftStart, 'HH:mm').format('mm'), 10) : 0}
label="Shift start" getValue={this.getPickerValue} />
Jakub Mandra staff premium answered 6 years ago
Hi,
We are aware of the problem. TimePicker was meant to watch for hours and minutes properties only on mount, but it will be upgraded as soon as possible.
Best,
Jakub
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Free
- Premium support: No
- Technology: MDB React
- MDB Version: 4.11.0
- Device: MacBook pro
- Browser: Chrome
- OS: MacOS
- Provided sample code: No
- Provided link: No