mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-29 01:22:07 +01:00
Set datetimepicker events to bubble so that they trigger a filter form refresh
This commit is contained in:
parent
be14465c4e
commit
7fd4e14f8e
@ -44,7 +44,7 @@ function initDateChooser(id, opts) {
|
|||||||
format: 'Y-m-d',
|
format: 'Y-m-d',
|
||||||
onGenerate: hideCurrent,
|
onGenerate: hideCurrent,
|
||||||
onChangeDateTime(_, $el) {
|
onChangeDateTime(_, $el) {
|
||||||
$el.get(0).dispatchEvent(new Event('change'));
|
$el.get(0).dispatchEvent(new Event('change', { bubbles: true }));
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
opts || {},
|
opts || {},
|
||||||
@ -59,7 +59,7 @@ function initDateChooser(id, opts) {
|
|||||||
format: 'Y-m-d',
|
format: 'Y-m-d',
|
||||||
onGenerate: hideCurrent,
|
onGenerate: hideCurrent,
|
||||||
onChangeDateTime(_, $el) {
|
onChangeDateTime(_, $el) {
|
||||||
$el.get(0).dispatchEvent(new Event('change'));
|
$el.get(0).dispatchEvent(new Event('change', { bubbles: true }));
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
opts || {},
|
opts || {},
|
||||||
@ -79,7 +79,7 @@ function initTimeChooser(id, opts) {
|
|||||||
scrollInput: false,
|
scrollInput: false,
|
||||||
format: 'H:i',
|
format: 'H:i',
|
||||||
onChangeDateTime(_, $el) {
|
onChangeDateTime(_, $el) {
|
||||||
$el.get(0).dispatchEvent(new Event('change'));
|
$el.get(0).dispatchEvent(new Event('change', { bubbles: true }));
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
opts || {},
|
opts || {},
|
||||||
@ -92,7 +92,7 @@ function initTimeChooser(id, opts) {
|
|||||||
datepicker: false,
|
datepicker: false,
|
||||||
format: 'H:i',
|
format: 'H:i',
|
||||||
onChangeDateTime(_, $el) {
|
onChangeDateTime(_, $el) {
|
||||||
$el.get(0).dispatchEvent(new Event('change'));
|
$el.get(0).dispatchEvent(new Event('change', { bubbles: true }));
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
opts || {},
|
opts || {},
|
||||||
@ -112,7 +112,7 @@ function initDateTimeChooser(id, opts) {
|
|||||||
scrollInput: false,
|
scrollInput: false,
|
||||||
onGenerate: hideCurrent,
|
onGenerate: hideCurrent,
|
||||||
onChangeDateTime(_, $el) {
|
onChangeDateTime(_, $el) {
|
||||||
$el.get(0).dispatchEvent(new Event('change'));
|
$el.get(0).dispatchEvent(new Event('change', { bubbles: true }));
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
opts || {},
|
opts || {},
|
||||||
@ -125,7 +125,7 @@ function initDateTimeChooser(id, opts) {
|
|||||||
format: 'Y-m-d H:i',
|
format: 'Y-m-d H:i',
|
||||||
onGenerate: hideCurrent,
|
onGenerate: hideCurrent,
|
||||||
onChangeDateTime(_, $el) {
|
onChangeDateTime(_, $el) {
|
||||||
$el.get(0).dispatchEvent(new Event('change'));
|
$el.get(0).dispatchEvent(new Event('change', { bubbles: true }));
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
opts || {},
|
opts || {},
|
||||||
|
Loading…
Reference in New Issue
Block a user