Fix datetimepicker annoyances

This commit is contained in:
Raphael Michel
2017-04-17 21:12:52 +02:00
parent 3dd2492926
commit d2d711c1f8
2 changed files with 40 additions and 23 deletions

View File

@@ -122,6 +122,7 @@ $(function () {
});
$("#ajaxerr").on("click", ".ajaxerr-close", ajaxErrDialog.hide);
moment.locale($("body").attr("data-datetimelocale"));
$(".datetimepicker").each(function() {
$(this).datetimepicker({
@@ -141,6 +142,9 @@ $(function () {
close: 'fa fa-remove'
}
});
if (!$(this).val()) {
$(this).data("DateTimePicker").viewDate(moment().hour(0).minute(0).second(0));
}
});
$(".datepickerfield").each(function() {