Skip to content

Commit f818f66

Browse files
committed
fixup! IBX-10653: flatpickr doesn't save seconds (unless minutes or other elements are changed afterwards)
1 parent 4b276ea commit f818f66

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/bundle/Resources/public/js/scripts/core/date.time.picker.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,9 @@ class DateTimePicker {
158158
if (this.flatpickrInstance.config.enableTime) {
159159
this.flatpickrInstance.hourElement.addEventListener('keyup', this.onKeyUp.bind(this, 'hours'), false);
160160
this.flatpickrInstance.minuteElement.addEventListener('keyup', this.onKeyUp.bind(this, 'minutes'), false);
161-
this.flatpickrInstance.secondElement.addEventListener('keyup', this.onKeyUp.bind(this, 'seconds'), false);
161+
if (this.flatpickrInstance.secondElement !== undefined) {
162+
this.flatpickrInstance.secondElement.addEventListener('keyup', this.onKeyUp.bind(this, 'seconds'), false);
163+
}
162164
}
163165
}
164166
}

0 commit comments

Comments
 (0)