Good day!
I am trying to achieve to change the color in the calendar cell of EXT Calendar for each holiday (holiday dates are from the database). But it only changes the first holiday which is the first line in the database.
My client side code :
var applyCss = function (param1) {
var css = "#CalendarPanel1-month-day-" + param1 + " {background-color: pink;}";
Ext.net.ResourceMgr.registerCssClass("someCssClassId", css);
};
My server side code:
DataTable holiday = Attendance.getInstance().getHolidays();
for (var i = 0; i < holiday.Rows.Count; i++)
{
var hd = holiday.Rows[i]["holiday_date"].ToString();
Page.ClientScript.RegisterClientScriptBlock(GetType(), "myScript", "applyCss(" + hd + ")", true);
}
Appreciate any recommendations / suggestions / solutions. Thanks!