I'm currently using the dojo calendar widget like in http://dojotoolkit.org/reference-guide/dojox/widget/Calendar.html
My requirement is this:
How could this be accomplished? Help appreciated much..
-Vinoth
有一个实验性的MultiSelectCalendar小部件
You can try this :
<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>
I didn't figure out how to keep the selected cells coloured yet, but it should be doable...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.