Hello All,
I am trying to compare the todays date and the selected date from user when the DatePicker Popup is closed .
Once the selected date is greater than todays date i need to enable the checkbox=true.
I am trying to compare the values but giving error.
Please correct me where am i going wrong.
I am trying to compare the todays date and the selected date from user when the DatePicker Popup is closed .
Once the selected date is greater than todays date i need to enable the checkbox=true.
I am trying to compare the values but giving error.
Please correct me where am i going wrong.
<telerik:RadDatePicker ID="dateActivation" runat="server" Calendar-CultureInfo="English (United Kingdom)" Calendar-DateRangeSeparator=" /" Calendar-Height="40px" DateInput-ReadOnly="True" Width="200px"> <Calendar ID="CalendarStart" runat="server" CultureInfo="English (UnitedKingdom)" DayStyle-ForeColor="Black" FocusedDate="1/1/1980 00:00:01 AM" OutOfRangeDayStyle-BackColor="#CCCCCC" OutOfRangeDayStyle-ForeColor="#CCCCCC" WeekendDayStyle-BackColor="#FF5050" WeekendDayStyle-ForeColor="#CC0000"> </Calendar> <DateInput ID="DateInputStart" runat="server" DateFormat="dd/MM/yyyy"></DateInput> <ClientEvents OnPopupClosing="PopupClosing" /> </telerik:RadDatePicker> <javascript> function PopupClosing(sender, args) { var datePicker = $find("<%= dateActivation.ClientID %>"); var SelectedDate = datePicker.get_calendar().get_selectedDates(); var todaysdate = datePicker.get_selectedDate(); var SelDate = new Date(datePicker[((datePicker.length))], datePicker[((datePicker.length))]- 1, datePicker[((datePicker.length))]); alert("SelDate==" + SelDate); var SDate = new Date(todaysdate); if (SelectedDate > SDate) { var chkActive = $find("<%= chkIsActive.ClientID %>"); chkActive.checked = false; } } <javascript>