Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-01-03 20:13:12 +0300
committerPhil Hughes <me@iamphill.com>2017-02-06 12:24:50 +0300
commitb138ec3da18a68b34fd446a442b2c7db653848b6 (patch)
treeeaedcba64341fab97bd3dc6708c1cfbedb436479 /app/assets/javascripts/issuable_form.js
parent572fb0be9b1d45437b7c0ed1000399657f471ec7 (diff)
Removed jQuery UI datepicker
Part of #18437 to remove jQuery UI. This removes the datepicker
Diffstat (limited to 'app/assets/javascripts/issuable_form.js')
-rw-r--r--app/assets/javascripts/issuable_form.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/app/assets/javascripts/issuable_form.js b/app/assets/javascripts/issuable_form.js
index 293b856dc4d..d02e98bf44e 100644
--- a/app/assets/javascripts/issuable_form.js
+++ b/app/assets/javascripts/issuable_form.js
@@ -3,6 +3,8 @@
/* global UsersSelect */
/* global ZenMode */
/* global Autosave */
+/* global dateFormat */
+/* global Pikaday */
(function() {
var bind = function(fn, me) { return function() { return fn.apply(me, arguments); }; };
@@ -35,12 +37,13 @@
this.initMoveDropdown();
$issuableDueDate = $('#issuable-due-date');
if ($issuableDueDate.length) {
- $('.datepicker').datepicker({
- dateFormat: 'yy-mm-dd',
- onSelect: function(dateText, inst) {
- return $issuableDueDate.val(dateText);
+ new Pikaday({
+ field: $issuableDueDate.get(0),
+ format: 'yyyy-mm-dd',
+ onSelect: function(dateText) {
+ $issuableDueDate.val(dateFormat(new Date(dateText), 'yyyy-mm-dd'));
}
- }).datepicker('setDate', $.datepicker.parseDate('yy-mm-dd', $issuableDueDate.val()));
+ }).setDate(new Date($issuableDueDate.val()));
}
}