Here is the Part of the code of DateTime Picker.When Someone Select StartDate & EndDate from date time picker it comes to unitHolidays.
In here i need get full holiday.I need to consider if someone select any Start Date but time is 12:00:00 AM to any End Date with time is 12:00:00 AM ( ex : see full holiday )
Full Holiday 9/19/2013 12:00:00 AM to 9/20/2013 12:00:00 AM
But my following code, it takes any 12 hour slot is a holiday.
foreach (UnitHolidays uh in unitHolidays)
{
for (DateTime dth = uh.StartDate; dth <= uh.EndDate; dth = dth.AddDays(1))
{
RadCalendarDay rcdHoliday = new RadCalendarDay();
rcdHoliday.Date = dth.Date;
rcdHoliday.IsDisabled = true;
rcdHoliday.IsSelectable = true;
rcdHoliday.ToolTip = "Holiday";
rcdHoliday.ItemStyle.BackColor = System.Drawing.Color.MediumOrchid;
rdpStDt.Calendar.SpecialDays.Add(rcdHoliday);
}
}
I need if someone select 12:00:00 AM to 12:00:00 AM then only I need to take it as a holiday.