summaryrefslogtreecommitdiff
path: root/assets/js/src
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js/src')
-rw-r--r--assets/js/src/App.js17
1 files changed, 10 insertions, 7 deletions
diff --git a/assets/js/src/App.js b/assets/js/src/App.js
index 3fe75640..cf630140 100644
--- a/assets/js/src/App.js
+++ b/assets/js/src/App.js
@@ -107,23 +107,26 @@ Kanboard.App.prototype.chosen = function() {
};
Kanboard.App.prototype.datePicker = function() {
- // Datepicker translation
- $.datepicker.setDefaults($.datepicker.regional[$("body").data("js-lang")]);
+ var bodyElement = $("body");
+ var dateFormat = bodyElement.data("js-date-format");
+ var timeFormat = bodyElement.data("js-time-format");
+ var lang = bodyElement.data("js-lang");
+
+ $.datepicker.setDefaults($.datepicker.regional[lang]);
+ $.timepicker.setDefaults($.timepicker.regional[lang]);
// Datepicker
$(".form-date").datepicker({
showOtherMonths: true,
selectOtherMonths: true,
- dateFormat: 'yy-mm-dd',
+ dateFormat: dateFormat,
constrainInput: false
});
// Datetime picker
$(".form-datetime").datetimepicker({
- controlType: 'select',
- oneLine: true,
- dateFormat: 'yy-mm-dd',
- // timeFormat: 'h:mm tt',
+ dateFormat: dateFormat,
+ timeFormat: timeFormat,
constrainInput: false
});
};