我正在尝试使用 jQgrid 和 datepicker 实现添加对话框。但是当我点击日期时,文本日期选择器不再可见。其他人运作良好。
我包括以下库,我的代码也如下:
<link rel="stylesheet" type="text/css" media="screen" href="DatePicker/css/jquery.ui.datepicker.css" />
<script src="DatePicker/js/jquery.ui.datepicker.js" type="text/javascript"></script>
colNames:['No','Date','Client','Available','Shipping','Note'],
colModel:[
{name:'srNo',index:'srNo', width:90,sortable:true,editable:true,stype:'text',search:true,searchrules: { required: true }},
{name:'last_modified_date', index:'last_modified_date', width:90, editable:true, editoptions:{size:20,
dataInit:function(el){
$(el).datepicker({dateFormat:'yy-mm-dd'});
},
defaultValue: function(){
var currentTime = new Date();
var month = parseInt(currentTime.getMonth() + 1);
month = month <= 9 ? "0"+month : month;
var day = currentTime.getDate();
day = day <= 9 ? "0"+day : day;
var year = currentTime.getFullYear();
return year+"-"+month + "-"+day;
}
}
},
{name:'stdStd',index:'stdStd', width:100,sortable:false,editable:true, edittype:"text", editoptions: {value:"Yes:No"}},
{name:'stdRollNo',index:'stdRollNo', width:180,sortable:false,editable:true},
{name:'ship',index:'ship', width:180,sortable:false,editable:true},
{name:'view',index:'view', width:100,sortable:false,editable:true}
],
为什么文本日期选择器消失了?