Hi Guys,
Here i am getting the following error:
Field record in a database as DateTime field 2012-07-03 00:00:00.000
Value of '3/07/2012 12:00:00 AM' is not valid for 'SelectedDate'. 'SelectedDate' should be between 'MinDate' and 'MaxDate'. Parameter name: SelectedDate.
The weird thing is it work the first time and the second or it randomly failed sometime in the second or third attempt.
<telerik:RadDatePicker ID="dtParticipationEnd" runat="server" AutoPostBack="true"
Skin="Office2007" DateInput-DateFormat="dd MMM yyyy"
DateInput-Width="20px" DateInput-CssClass="controlText" DateInput-Enabled="true"
MinDate="01/01/1000" MaxDate="01/01/3000">
</telerik:RadDatePicker>
None the following which i have tried worked.
if (this.participationEntity.ParticipationEnd != null)
{
string participationEnd = ((DateTime)this.participationEntity.ParticipationEnd).ToShortDateString();
dtParticipationEnd.DbSelectedDate = participationEnd;
}
else
{
dtParticipationEnd.DbSelectedDate = null;
}
Second option i tried:
if (this.participationEntity.ParticipationEnd != null) dtParticipationEnd.DbSelectedDate = this.participationEntity.ParticipationEnd;
Here i am getting the following error:
Field record in a database as DateTime field 2012-07-03 00:00:00.000
Value of '3/07/2012 12:00:00 AM' is not valid for 'SelectedDate'. 'SelectedDate' should be between 'MinDate' and 'MaxDate'. Parameter name: SelectedDate.
The weird thing is it work the first time and the second or it randomly failed sometime in the second or third attempt.
<telerik:RadDatePicker ID="dtParticipationEnd" runat="server" AutoPostBack="true"
Skin="Office2007" DateInput-DateFormat="dd MMM yyyy"
DateInput-Width="20px" DateInput-CssClass="controlText" DateInput-Enabled="true"
MinDate="01/01/1000" MaxDate="01/01/3000">
</telerik:RadDatePicker>
None the following which i have tried worked.
if (this.participationEntity.ParticipationEnd != null)
{
string participationEnd = ((DateTime)this.participationEntity.ParticipationEnd).ToShortDateString();
dtParticipationEnd.DbSelectedDate = participationEnd;
}
else
{
dtParticipationEnd.DbSelectedDate = null;
}
Second option i tried:
if (this.participationEntity.ParticipationEnd != null) dtParticipationEnd.DbSelectedDate = this.participationEntity.ParticipationEnd;