Skip to content

Commit 8099824

Browse files
committed
fix(TimePicker): correct handling of the update method
1 parent 77c0d24 commit 8099824

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

js/src/time-picker.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,12 @@ class TimePicker extends Picker {
135135

136136
update(config) {
137137
this._config = this._getConfig(config)
138-
this._element.innerHTML = ''
138+
this._date = this._convertStringToDate(this._config.time)
139+
this._ampm = this._date ? getAmPm(new Date(this._date), this._config.locale) : 'am'
140+
141+
this._dropdownToggleEl.innerHTML = ''
142+
this._dropdownMenuEl.innerHTML = ''
143+
139144
this._createTimePicker()
140145
this._createTimePickerSelection()
141146
}

0 commit comments

Comments
 (0)