Skip to content
Snippets Groups Projects
Commit b7d4b9ce authored by Elmar Ludwig's avatar Elmar Ludwig Committed by Jan-Hendrik Willms
Browse files

jump to current date when "Now" is clicked, fixes #2084

Closes #2084

Merge request studip/studip!1347
parent 7b872489
No related branches found
No related tags found
No related merge requests found
......@@ -560,6 +560,7 @@ import { $gettext } from './lib/gettext.js';
'z-index': 1002
});
},
showButtonPanel: true,
onSelect: function (value, instance) {
if (value !== instance.lastVal) {
$(this).change();
......@@ -608,6 +609,13 @@ import { $gettext } from './lib/gettext.js';
$(input).datepicker('hide');
}
// Jump to current date when "Now" is clicked
var _gotoToday = $.datepicker._gotoToday;
$.datepicker._gotoToday = function(id) {
_gotoToday.call(this, id);
this._selectDate(id);
};
$.timepicker.setDefaults(Object.assign({}, defaults, {
timeFormat: 'HH:mm'
}));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment