1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
dojo.addOnLoad(function() {
//Need to declare BigCalendar here in an addOnLoad block so that it works
//with xdomain loading, where the dojo.require for dijit._Calendar
//may load asynchronously. This also means we cannot have HTML
//markup in the body tag for BigCalendar, but instead inject it in this
//onload handler after BigCalendar is defined.
dojo.declare("BigCalendar", dijit._Calendar, {
getClassForDate: function(date) {
if (! (date.getDate() % 10)) {
return "blue";
} // apply special style to all days divisible by 10
}
});
var bigCalendar = dojo.byId("calendar5");
bigCalendar.setAttribute("dojoType", "BigCalendar");
dojo.parser.parse(bigCalendar.parentNode); |
Partager