如何置jquery-ui datepicker的z-index值的呢?
分析datepicker的源碼,發現彈出的日期選擇框的z-index值是:$(input).zIndex() + 1。繼續分析$.zIndex()函數(在jquery-ui.js文件中),發現當input的css position值為absolute、fixed或relative時,$.zIndex()函數返回的值就是input css 的z-index值。
例如:<input type="text" name="add_date" id="add_date" style="z-index:1000;position:relative;" value="" />這樣設置時,彈出的jquery-ui datepicker日期選擇框的z-index值就設置為1001了。