在我的 jqgrid 中需要一个用于 EntryDate 的弹出日期选择器..但不要有什么问题
<script type="text/javascript">
jQuery("#Countrylist").jqGrid({
url: '/Country/GetAllCountries/',
datatype: 'json',
mtype: 'GET',
colNames: ['EntryDate','EntryBy'],
colModel: [
{
name: 'EntryDate', index: 'EntryDate', width: 90, editable: true,
editoptions: {
dataInit: function (el)
{ setTimeout(function () { $(el).datepicker(); }, 200); }
}
},
{ name: 'EntryBy', index: 'EntryBy', width: '200', align: 'center', editable: true, editable: true }
],
editurl: "/Country/Edition",
}); jQuery("#Countrylist").jqGrid('navGrid', '#Countrypager',
{ edit: true, add: true, del: true, search: false, refresh: true },
{
closeOnEscape: true, reloadAfterSubmit: true,
closeAfterEdit: true, left: 450, top: 300, width: 520
},
{ closeOnEscape: true, reloadAfterSubmit: true, left: 450, top: 300, url: "/Country/Deletion", mtype: "POST" },
{ closeOnEscape: true, reloadAfterSubmit: true, left: 450, top: 300 });
});
</script>
在我的布局页面中,我有以下参考
<link href="~/Scripts/jquery.jqGrid-4.5.2/css/ui.jqgrid.css" rel="stylesheet" />
<link href="~/Scripts/pepper-grinder/jquery.ui.theme.css" rel="stylesheet" />
<script src="~/jquery-ui-1.9.2.custom/js/jquery-1.8.3.js"></script>
<script src="~/jquery-ui-1.9.2.custom/js/jquery-ui-1.9.2.custom.min.js"></script>
<script src="~/jquery-ui-1.9.2.custom/development-bundle/ui/jquery.ui.datepicker.js"></script>
<script src="~/Scripts/jquery.jqGrid-4.5.2/src/jquery.jqGrid.js"></script>
<script src="~/Scripts/jquery.jqGrid-4.5.2/src/i18n/grid.locale-en.js"></script>
<script src="~/Scripts/jquery.jqGrid-4.5.2/src/jquery.jqGrid.js"></script>
<script src="~/Scripts/jquery.jqGrid-4.5.2/src/jqModal.js"></script>
<script src="~/Scripts/jquery.jqGrid-4.5.2/src/jqDnR.js"></script>
firebug 显示以下错误
$(...).datepicker 不是函数
但我可以看到 datepicker 在 firebugs net 选项卡中成功加载