Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: How to update TimePicker programmatically

qweluke free asked 5 years ago


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 answered 5 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



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.11.0
  • Device: MacBook pro
  • Browser: Chrome
  • OS: MacOS
  • Provided sample code: Yes
  • Provided link: No