Skip to content

Commit 1789ff3

Browse files
committed
Fix: render the date and time when re-opening the picker
Fixes a bug where the picker would render a blank space instead of the date and time when the picker was closed then re-opened. Original credit: @Luisetelo in #129.
1 parent c5fc7da commit 1789ff3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/js/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ class DateTimePicker extends Events {
9797
this.value = moment(0);
9898
this.setDate(this.options.default);
9999
this.setTime(this.options.default);
100+
} else {
101+
this.setDate(this.value);
102+
this.setTime(this.value);
100103
}
101104

102105
this.initializeRome(this.$(`.${this.options.styles.container}`), this.options.dateValidator);

0 commit comments

Comments
 (0)