From 7fd4e14f8efb68d7696bcb6be639b2319444f1d7 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Wed, 10 Jan 2024 22:40:58 +0000 Subject: [PATCH] Set datetimepicker events to bubble so that they trigger a filter form refresh --- client/src/entrypoints/admin/date-time-chooser.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/client/src/entrypoints/admin/date-time-chooser.js b/client/src/entrypoints/admin/date-time-chooser.js index b6213c5c33..878c7f81ab 100644 --- a/client/src/entrypoints/admin/date-time-chooser.js +++ b/client/src/entrypoints/admin/date-time-chooser.js @@ -44,7 +44,7 @@ function initDateChooser(id, opts) { format: 'Y-m-d', onGenerate: hideCurrent, onChangeDateTime(_, $el) { - $el.get(0).dispatchEvent(new Event('change')); + $el.get(0).dispatchEvent(new Event('change', { bubbles: true })); }, }, opts || {}, @@ -59,7 +59,7 @@ function initDateChooser(id, opts) { format: 'Y-m-d', onGenerate: hideCurrent, onChangeDateTime(_, $el) { - $el.get(0).dispatchEvent(new Event('change')); + $el.get(0).dispatchEvent(new Event('change', { bubbles: true })); }, }, opts || {}, @@ -79,7 +79,7 @@ function initTimeChooser(id, opts) { scrollInput: false, format: 'H:i', onChangeDateTime(_, $el) { - $el.get(0).dispatchEvent(new Event('change')); + $el.get(0).dispatchEvent(new Event('change', { bubbles: true })); }, }, opts || {}, @@ -92,7 +92,7 @@ function initTimeChooser(id, opts) { datepicker: false, format: 'H:i', onChangeDateTime(_, $el) { - $el.get(0).dispatchEvent(new Event('change')); + $el.get(0).dispatchEvent(new Event('change', { bubbles: true })); }, }, opts || {}, @@ -112,7 +112,7 @@ function initDateTimeChooser(id, opts) { scrollInput: false, onGenerate: hideCurrent, onChangeDateTime(_, $el) { - $el.get(0).dispatchEvent(new Event('change')); + $el.get(0).dispatchEvent(new Event('change', { bubbles: true })); }, }, opts || {}, @@ -125,7 +125,7 @@ function initDateTimeChooser(id, opts) { format: 'Y-m-d H:i', onGenerate: hideCurrent, onChangeDateTime(_, $el) { - $el.get(0).dispatchEvent(new Event('change')); + $el.get(0).dispatchEvent(new Event('change', { bubbles: true })); }, }, opts || {},