Home > Web Front-end > JS Tutorial > 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
Release: 2016-05-16 18:19:02
Original
1101 people have browsed it

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.
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template