提交 4e7acd88 编写于 作者: T 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.
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册