ui: fix pick time with change event (#501)

This commit is contained in:
panda authored and GitHub committed 2023-02-03 19:39:58 +08:00
1 parent 726d684ef2
commit 6823a1ed2e
4 files changed
+7 -5

No files matched your search

@@ -11,13 +11,15 @@ const datepickerPage = new AutoloadPage('datepickerPage', async () => {
flatpickr(this, { allowInput: true });
});
$('[data-pick-time]').each(function () {
if (!$(this).data('pickatime')) {
const $this = $(this);
if (!$this.data('pickatime')) {
// eslint-disable-next-line no-new
new Picker(this, 'pickatime', TimePicker, {
format: 'H:i',
editable: true,
interval: 15,
clear: false,
onSet() { $this.trigger('change'); },
});
}
});