I am using the Online Demo Calendar Template example http://demos.telerik.com/aspnet-ajax/calendar/examples/functionality/specialdays/defaultcs.aspx to create a templated calendar. I want to assign all Saturday/Sundays and all days prior to todays date to a template to indicate these days are unavailable. I also want to assign days pulled from a database to this template as well (I have not implemented the database piece yet, my code below is just assigning today's date).
I created the template declaratively like in the example. I need to assign the special days/template programmatically. I am using the RadCalendar_DayRender event to assign special days/template for the saturday/sunday. I am using the Page_Load event to assign the days from the database.
Days assigned in the DayRender event are not showing the template at all.
Days assigned in the Page_Load event are showing a generic template (not the template I assign) on initial page load, but then show the template that I assigned on post back.
1) How do I get the correct template to show on initial page load?
2) How can I assign all saturday/sundays and all days prior to today in the Page_Load event? or how can I get the template assignment to work in the DayRender Event.
Here is my code.
Thank you for your help.