I'm using SelectedDate from the RadCalendar to display local events from a database using a listview and sqldatasource. It works fine unless I click the same date twice. The SelectedDate is then set to 1/1/0001 12:00:00 AM and I get the error "SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM".
I read that selecting one date causes the previously selected date to become unselected, so I understand why it's happening, I just can't find a workaround.
Is there a way to make the currently selected date inactive (unclickable)? Or, can I check if the user selected the same date?
I tried using Calendar1_SelectionChanged but can't find a way to get the SelectedDate which is really unselected. The FocusedDate is set to today's date, so I can't use it.
I read that selecting one date causes the previously selected date to become unselected, so I understand why it's happening, I just can't find a workaround.
Is there a way to make the currently selected date inactive (unclickable)? Or, can I check if the user selected the same date?
I tried using Calendar1_SelectionChanged but can't find a way to get the SelectedDate which is really unselected. The FocusedDate is set to today's date, so I can't use it.
<telerik:RadCalendar ID="Calendar1" runat="server" EnableMultiSelect="false" ShowRowHeaders="false" AutoPostBack="true" Skin="MetroTouch" RenderMode="Lightweight"> </telerik:RadCalendar><asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyConnString %>"> <SelectParameters> <asp:ControlParameter ControlID="Calendar1" Name="calendar1" PropertyName="SelectedDate" /> </SelectParameters></asp:SqlDataSource>