Skip to content

Commit cbb7095

Browse files
committed
reversed hunk from e497916
1 parent 1bafda6 commit cbb7095

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/timepicker.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ export class Timepicker extends Component<TimepickerOptions> {
253253
this.el.addEventListener('keydown', this._handleInputKeydown);
254254
this.plate.addEventListener('mousedown', this._handleClockClickStart);
255255
this.plate.addEventListener('touchstart', this._handleClockClickStart);
256-
this.digitalClock.addEventListener('change', this._inputFromTextField);
256+
this.digitalClock.addEventListener('keyup', this._inputFromTextField);
257257
this.inputHours.addEventListener('focus', () => this.showView('hours'));
258258
this.inputMinutes.addEventListener('focus', () => this.showView('minutes'));
259259
this.inputMinutes.addEventListener('focusout', () => this.formatMinutes());
@@ -568,7 +568,7 @@ export class Timepicker extends Component<TimepickerOptions> {
568568
this.hours = +value[0] || 0;
569569
this.minutes = +value[1] || 0;
570570
this.inputHours.value = this.hours;
571-
this.inputMinutes.value = this.minutes;
571+
this.inputMinutes.value = Timepicker._addLeadingZero(this.minutes);
572572

573573
this._updateAmPmView();
574574
}
@@ -819,9 +819,9 @@ export class Timepicker extends Component<TimepickerOptions> {
819819
<div class="timepicker-digital-display">
820820
<div class="timepicker-text-container">
821821
<div class="timepicker-display-column">
822-
<input type="number" maxlength="2" autofocus class="timepicker-input-hours text-primary" min="1" max="12"/>
822+
<input type="text" maxlength="2" autofocus class="timepicker-input-hours text-primary" />
823823
:
824-
<input type="number" maxlength="2" class="timepicker-input-minutes" min="0" max="59"/>
824+
<input type="text" maxlength="2" class="timepicker-input-minutes" />
825825
</div>
826826
<div class="timepicker-display-column timepicker-display-am-pm">
827827
<div class="timepicker-span-am-pm"></div>

0 commit comments

Comments
 (0)