Hello,
I have a RadDateTimePicker used where the mindate is the current time and setting the selected datetime to the closest 30 minutes from the current time onwards. Even though I set the mindate to the current time. I am able to select an earlier time before the mindate value from the timeview.
ASP Markup :
C# Code :
I have a RadDateTimePicker used where the mindate is the current time and setting the selected datetime to the closest 30 minutes from the current time onwards. Even though I set the mindate to the current time. I am able to select an earlier time before the mindate value from the timeview.
ASP Markup :
<
telerik:RadDateTimePicker
ID
=
"dpDate"
runat
=
"server"
Width
=
"190"
TabIndex
=
"19"
>
<
Calendar
ID
=
"ddCalendar"
runat
=
"server"
EnableKeyboardNavigation
=
"true"
>
</
Calendar
>
<
DateInput
ID
=
"ddDate"
runat
=
"server"
DateFormat
=
"dd/MM/yyyy hh:mm tt"
>
</
DateInput
>
<
TimeView
ID
=
"TimeView1"
runat
=
"server"
Interval
=
"00:30:00"
>
</
TimeView
>
</
telerik:RadDateTimePicker
>
C# Code :
this
.dpDate.MinDate = DateTime.Now;
this
.dpDate.SelectedDate = DateTime.Now.AddMinutes(30 - (DateTime.Now.Minute % 30)).AddSeconds(-DateTime.Now.Second).AddMilliseconds(-DateTime.Now.Millisecond);