我目前正在使用dojo日历小部件 http://dojotoolkit.org/reference-guide/dojox/widget/Calendar.html
我的要求是:
如何实现这一目标? 帮助多多赞赏..
-Vinoth
答案 0 :(得分:3)
有一个实验性MultiSelectCalendar小部件
答案 1 :(得分:2)
你可以试试这个:
<head>
<script type="text/javascript">
var selectedDates = {};
</script>
</head>
<body class="soria">
<style type="text/css">
@import "dojox/widget/Calendar/Calendar.css";
</style>
<div dojoType="dojox.widget.Calendar">
<script type="dojo/connect" event="onValueSelected" args="date">
if (!selectedDates[date]) {
selectedDates[date] = 1;
} else {
delete selectedDates[date];
}
var list = dojo.byId("selectedDates");
dojo.attr(list, "innerHTML", "");
for (var date in selectedDates) {
if (selectedDates.hasOwnProperty(date)) {
dojo.create("li", {"innerHTML":date}, list);
}
}
</script>
</div>
<ul id="selectedDates"></ul>
</body>
我还没弄清楚如何保持所选细胞的颜色,但它应该是可行的......