Hi All,
I am using 'RadDatePicker' in my web application. I am using following java script to display current date as selected date by default and this script is working fine. My problem is that for selecting selected date(which is by default current date) i have to click two time on same date, first click remove its selection and second click select it and display it in date picker. i just want to do selection of selectted date at single click.
Please help me its urgent.
I am using 'RadDatePicker' in my web application. I am using following java script to display current date as selected date by default and this script is working fine. My problem is that for selecting selected date(which is by default current date) i have to click two time on same date, first click remove its selection and second click select it and display it in date picker. i just want to do selection of selectted date at single click.
Please help me its urgent.
function
CurrentDateSelection(sender, eventArgs) {
if (sender.get_selectedDate() == null) {
eventArgs.set_cancelCalendarSynchronization(true);
var popup = eventArgs.get_popupControl();
var todaysDate = new Date();
var todayTriplet = [todaysDate.getFullYear(), todaysDate.getMonth() + 1, todaysDate.getDate()];
popup.selectDate(todayTriplet, true);
}
}
-----------------------------------------
<telerik:RadDatePicker ID="RadDatePickerAnswerDate" runat="server" Width="110px">
<DateInput ID="DateInput25" runat="server" DateFormat="MM/dd/yyyy" />
<ClientEvents OnPopupOpening="CurrentDateSelection" />
</telerik:RadDatePicker>