selecting multiple date in asp.net calendar control
I need to be able to select multiple dates on a calendar control and highlight the selected cells' background color.
To be more precise, I need to let the user select a start date and an end date and have all the cells through these two dates highlighted.
I tried the code below which does exactly what I want when the user clicks a date in the calendar, but once he/she click on another date the highlight is moved from the first date to the latter. I need the highlight to stay on all selected dates. Or, better still, the user enters a start date into a text box and and and an end date into a second box and the dates from start to end be highlighted.
Protected Sub Calendar1_DayRender(ByVal sender As Object, _
ByVal e As DayRenderEventArgs) Handles calendar1.DayRender
If e.Day.IsSelected = True Then
e.Cell.BackColor = System.Drawing.Color.Yellow