mirror of
https://github.com/pretix/pretix.git
synced 2026-05-10 16:04:02 +00:00
Date picker: Guess default time 23:59 for end dates (Z#23182900) (#4917)
* Date picker: Guess default time 23:59 for end dates (Z#23182900) * Update src/pretix/static/pretixcontrol/js/ui/main.js Co-authored-by: luelista <weller@rami.io> * Update src/pretix/static/pretixpresale/js/ui/main.js Co-authored-by: luelista <weller@rami.io> --------- Co-authored-by: luelista <weller@rami.io>
This commit is contained in:
@@ -205,7 +205,11 @@ var form_handlers = function (el) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($timepicker.val() === "") {
|
if ($timepicker.val() === "") {
|
||||||
date.set({'hour': 0, 'minute': 0, 'second': 0});
|
if (/_(until|end|to)(_|$)/.test($(this).attr("name"))) {
|
||||||
|
date.set({'hour': 23, 'minute': 59, 'second': 59});
|
||||||
|
} else {
|
||||||
|
date.set({'hour': 0, 'minute': 0, 'second': 0});
|
||||||
|
}
|
||||||
$timepicker.data('DateTimePicker').date(date);
|
$timepicker.data('DateTimePicker').date(date);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -91,7 +91,11 @@ var form_handlers = function (el) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($timepicker.val() === "") {
|
if ($timepicker.val() === "") {
|
||||||
date.set({'hour': 0, 'minute': 0, 'second': 0});
|
if (/_(until|end|to)(_|$)/.test($(this).attr("name"))) {
|
||||||
|
date.set({'hour': 23, 'minute': 59, 'second': 59});
|
||||||
|
} else {
|
||||||
|
date.set({'hour': 0, 'minute': 0, 'second': 0});
|
||||||
|
}
|
||||||
$timepicker.data('DateTimePicker').date(date);
|
$timepicker.data('DateTimePicker').date(date);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user