I am trying to use this control to allow clients to set dates when their business is closed. Basically I want to display a year at a time and allow them to select dates and save those to a database.
1. That pretty much works well, except I would like to show the calendar starting at January first for the current year and cannot figure that out.
2. How do I reload the saved/selected dates? I see that SelectedDates is read-only.
4 Answers, 1 is accepted
More questions/issues...
I figured out #2 above, but I am having more issues. I am trying to disable certain days so clients cannot select those. The selection/enabling/disabling is working fine it is the formatting/css that seem to be flawed.
For example I am going through and adding all the holidays to the SpecialDays in the PageLoad and those are disabled and the css class is radDisabled automatically then and so the back color displays as a lighter shade of the specified color = GREAT!
However, when I do the exact same code in the OnDayRender method the date(s) are disabled and not selectable but the back colors does not change like the other. What can I do to make both of these appear the same on the calendar?
Here is the code I am using in both places.
RadCalendarDay calendarDay = new RadCalendarDay();
calendarDay.Date = CurrentDate.Date;
calendarDay.IsDisabled = true;
calendarDay.IsSelectable = false;
radCalendar.SpecialDays.Add(calendarDay);
Anyone here today?
I have found workarounds for many of my issues, but now the issues is with the post back. I and using the same basic code as above but added the line below to the dayrender event to get all the special and disabled dates to show the same way when the calendar loads.
e.Cell.CssClass = "rcDisabled";
The problem is when you select a date it loses that css since apparently that is not called on postback. So how do I get the cells to display correctly even on postback?
Any quick replies are much appreciated, we are on a time crunch for implementing this.
I am sending two sample web site as a reference point. Please examine the attached applications and let me know which one you prefer to continue with. In addition, you can also instruct us any further steps or requirements.
Regards,
Eyup
Telerik