目前我的项目页面有一个jQuery datepicker内联放置在页面的一个部分。以下代码用于实现相同。从jQuery选择日期时打开jQuery对话框datepicker inline
<link rel="stylesheet" href="~/Scripts/Calendar/jquery-ui-1.10.1.custom.css">
<script src="~/Scripts/Calendar/jquery-1.9.1.js"></script>
<script src="~/Scripts/Calendar/jquery-ui-1.10.1.custom.js"></script>
<script>
$(document).on("change", "#datepicker", function() {
var date = $(this).val();
$("#dialog").dialog();
});
</script>
// The below section is in one of the sections
<div id="datepicker" style="font: 80% 'Trebuchet MS', sans-serif;"></div>
<script>
$("#datepicker").datepicker();
</script>
.
.
.
<div id="dialog-modal" title="Basic modal dialog">
<p>Adding the modal overlay screen.</p>
</div>
现在我将不得不显示一个jQuery对话框的信息,当用户点击一个特定的日期。
嗯,我试着拨打对话框
$(document).on("change", "#datepicker", function() {
var date = $(this).val();
$("#dialog").dialog();
});
,但它显示了一个错误的对象不支持属性或方法对话框。
任何机构都可以让我走向正确的方向。
谢谢
这里是id为 “对话框中的” 你的元素? – PSL 2013-03-18 04:05:31
我想你多次包括一些'Script'文件..请再次检查! – Vitthal 2013-03-18 04:08:15