mirror of
https://github.com/pretix/pretix.git
synced 2026-05-11 16:13:59 +00:00
Add min/max validation for date, datetime, and number questions (#1858)
This commit is contained in:
@@ -64,6 +64,14 @@ var form_handlers = function (el) {
|
||||
close: 'fa fa-remove'
|
||||
},
|
||||
};
|
||||
if ($(this).is('[data-min]')) {
|
||||
opts["minDate"] = $(this).attr("data-min");
|
||||
opts["viewDate"] = $(this).attr("data-min");
|
||||
}
|
||||
if ($(this).is('[data-max]')) {
|
||||
opts["maxDate"] = $(this).attr("data-max");
|
||||
opts["viewDate"] = $(this).attr("data-max");
|
||||
}
|
||||
$(this).datetimepicker(opts);
|
||||
if ($(this).parent().is('.splitdatetimerow')) {
|
||||
$(this).on("dp.change", function (ev) {
|
||||
|
||||
Reference in New Issue
Block a user