我已经包含了jquery库,但是datepicker无效 -
<input type="text" id="escd111" name="hsghd" readonly="readonly" />
<link rel="stylesheet" type="text/css" media="all" href="<?php echo base_url(); ?>js/kvch/datepicker/jsDatePick_ltr.min.css" />
<script type="text/javascript" src="<?php echo base_url(); ?>js/kvch/datepicker/jsDatePick.min.1.3.js"></script>
$(document).ready(function(e) {
new JsDatePick({
useMode:2,
target:"escd111",
dateFormat:"%d-%M-%Y"
/*selectedDate:{ This is an example of what the full configuration offers.
day:5, For full documentation about these settings please see the full version of the code.
month:9,
year:2006
},
yearsRange:[1978,2020],
limitToToday:false,
cellColorScheme:"beige",
dateFormat:"%m-%d-%Y",
imgPath:"img/",
weekStartDay:1*/
});
});
请帮助我...........
答案 0 :(得分:0)
在使用window.onload的供应商示例中,您使用document.ready来初始化datapicker。 你需要一些东西:
window.addEventListener('load',function(){
new JsDatePick({
useMode:2,
target:"inputField",
dateFormat:"%d-%M-%Y"
});
})
然后加载了所有脚本
答案 1 :(得分:0)
尝试这种方式:
$("#date").datepicker({dateFormat:yyyy-mm-dd',defaultDate: "+5",showOtherMonths: true});