Home  >  Article  >  Web Front-end  >  Solution to the default z-index of 1 in JQuery UI DatePicker_jquery

Solution to the default z-index of 1 in JQuery UI DatePicker_jquery

WBOY
WBOYOriginal
2016-05-16 18:19:021060browse

I haven't been able to find an effective solution on the Internet. Here I provide a seemingly speculative solution:

Copy code The code is as follows :

$("#txtFillInDate").datepicker({
monthNames: ['January', 'February', 'March', 'April', 'May ', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
dayNamesMin: ['Day', '一', '二', '三', '四', '五', '六'],
dateFormat: 'yy-mm-dd',
beforeShow: function () {
setTimeout(
function () {
$('#ui-datepicker-div').css("z-index", 15);
}, 100
);
}
});

The key lies in the use of beforeShow. You can understand it at a glance, so I won’t go into details here. I hope it can be helpful to you.
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn