Reputation: 521
Is there any way to highlight a specific date on a calendar popup (not multilselect or ordinary dojo calendar component but calendar on DateTextBox ) displayed when a user clicks on the dijit.form.DateTextBox??
Upvotes: 2
Views: 1140
Reputation: 1525
I was trying to do something similar and found the following helpful. Maybe it will help you as well.
To style specific dates on the DateTextBox popup calendar you have to use popupClass and set a custom dojo class based on dijit/Calendar.
First declare a dojo class then set the popupClass for the DateTextBox:
var MyCalendar = declare("custom/widgets/MyCalendar", Calendar, {
getClassForDate: function(date) {
return "myCssClass"; // applies style to all days. Use logic if needed.
}
});
dateBox = new DateTextBox({
id: "dateBox",
popupClass: MyCalendar
});
Above is not full code.
But, I found a working example on jsfiddle that should help: http://jsfiddle.net/ecw5U/
Upvotes: 0