Commit 4e7acd88 authored by Timothy Andrew's avatar Timothy Andrew

Remove unnecessary javascript from the datepicker initialization.

- In the personal access tokens page.
- Also fix the z-index so it doesn't appear below the token text fields.
parent 25aefde6
......@@ -90,5 +90,16 @@
:javascript
$(".datepicker").datepicker({
dateFormat: "yy-mm-dd",
onSelect: function(dateText, inst) { $("#personal_access_token_expires_at").val(dateText) }
}).datepicker("setDate", $.datepicker.parseDate('yy-mm-dd', $('#personal_access_token_expires_at').val()));
\ No newline at end of file
beforeShow: function() {
////////////////////////////////////////////////////////////////
// 1. Need the setTimeout because the datepicker doesn't have //
// an `afterShow` callback. //
// 2. Need to set the z-index like this because we don't want //
// to target datepickers outside the current page, which //
// will happen if we set this in CSS directly. //
////////////////////////////////////////////////////////////////
setTimeout(function(){
$('.ui-datepicker').css('z-index', 3);
}, 0);
}
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment