4 Answers, 1 is accepted
0
Hello Kevin,
For more information about how to disable calendar days, please refer to the following article:
Code Library
Greetings,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
For more information about how to disable calendar days, please refer to the following article:
Code Library
Greetings,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Kevin
Top achievements
Rank 1
answered on 09 Jun 2009, 03:53 PM
Hi Pavlina
the example doesnt cover what i need to do with the control i need to enable and disable days based on if they are in the if statement im writing it seems that the code covers a certain day IE saturday or sunday
Thanks
the example doesnt cover what i need to do with the control i need to enable and disable days based on if they are in the if statement im writing it seems that the code covers a certain day IE saturday or sunday
Thanks
0
Shinu
Top achievements
Rank 2
answered on 11 Jun 2009, 06:51 AM
Hi Kevin,
You may try the following code snippet to disable a set of Dates in the given date range.
CS:
Thanks
Shinu
You may try the following code snippet to disable a set of Dates in the given date range.
CS:
protected void RadCalendar1_DayRender(object sender, Telerik.Web.UI.Calendar.DayRenderEventArgs e) |
{ |
DateTime StartDate = Convert.ToDateTime("06/11/2009"); |
DateTime EndDate = Convert.ToDateTime("06/15/2009"); |
if (e.Day.Date >= StartDate.Date && e.Day.Date <= EndDate.Date) |
{ |
// disable the selection for the specific day |
RadCalendarDay calendarDay = new RadCalendarDay(); |
calendarDay.Date = e.Day.Date; |
calendarDay.IsSelectable = false; |
RadCalendar1.SpecialDays.Add(calendarDay); |
} |
} |
Thanks
Shinu
0
Kevin
Top achievements
Rank 1
answered on 15 Jun 2009, 09:21 AM
Thanks Shinu that has wored a treat however there is another question i would like to ask how do i make my days that i need to use a different colour im currently using this code
any ideas?
if (current <= end) |
{ |
currentCell = a.Cell; |
currentCell.Style["background-color"] = backgroundColor; |
currentCell.Visible = true; |
} |