Showing Default Year in RADDatePicker Control

2 posts, 0 answers
  1. Gaurav Gupta
    Gaurav Gupta avatar
    4 posts
    Member since:
    Oct 2009

    Posted 23 Oct 2009 Link to this post

    I am using RAD DatePicker Control. When i click on Calendar button  i want the default calendar of 1980 year to get opened instead of present day calendar.

    Anybody can please help me..

    Regards,
    Gaurav
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 23 Oct 2009 Link to this post

    Hello Gaurav Gupta,

    Try attaching OnPopupOpening event and set the focusedDate in the event handler as shown below.

     
    <script type="text/javascript"
    function OnPopupOpening(sender, args) { 
        date1 = new Date(sender.get_focusedDate().format("MM/dd/yyyy")); 
        date1.setFullYear(1980); 
        sender.set_focusedDate(date1); 
    </script> 

    -Shinu.
Back to Top