diff options
author | Phil Hughes <me@iamphill.com> | 2017-01-03 17:13:12 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-02-06 09:24:50 +0000 |
commit | b138ec3da18a68b34fd446a442b2c7db653848b6 (patch) | |
tree | eaedcba64341fab97bd3dc6708c1cfbedb436479 /app/views/profiles/personal_access_tokens/index.html.haml | |
parent | 572fb0be9b1d45437b7c0ed1000399657f471ec7 (diff) | |
download | gitlab-ce-b138ec3da18a68b34fd446a442b2c7db653848b6.tar.gz |
Removed jQuery UI datepicker
Part of #18437 to remove jQuery UI. This removes the datepicker
Diffstat (limited to 'app/views/profiles/personal_access_tokens/index.html.haml')
-rw-r--r-- | app/views/profiles/personal_access_tokens/index.html.haml | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/app/views/profiles/personal_access_tokens/index.html.haml b/app/views/profiles/personal_access_tokens/index.html.haml index 60a561c9f9c..d002150e531 100644 --- a/app/views/profiles/personal_access_tokens/index.html.haml +++ b/app/views/profiles/personal_access_tokens/index.html.haml @@ -85,11 +85,16 @@ :javascript - var date = $('#personal_access_token_expires_at').val(); - - var datepicker = $(".datepicker").datepicker({ - dateFormat: "yy-mm-dd", - minDate: 0 + var $dateField = $('#personal_access_token_expires_at'); + var date = $dateField.val(); + + new Pikaday({ + field: $dateField.get(0), + format: 'yyyy-mm-dd', + minDate: new Date(), + onSelect: function(dateText) { + $dateField.val(dateFormat(new Date(dateText), 'yyyy-mm-dd')); + } }); $("#created-personal-access-token").click(function() { |