How to select 'Select Date' on single click

2 posts, 0 answers
  1. Abhay
    Abhay avatar
    5 posts
    Member since:
    Nov 2010

    Posted 04 Feb 2011 Link to this post

    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.

    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>

     

     

     

     

     

     

     

     

     

     

     

     

     

  2. Pavel
    Admin
    Pavel avatar
    904 posts

    Posted 10 Feb 2011 Link to this post

    Hello Abhay,

    You can highlight today's date in the calendar using the approach illustrated in this example. This will allow the date to be easily recognized by the user, and at the same time remain selectable.

    All the best,
    Pavel
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top