How to Set Default Year in DatePicker

2 posts, 0 answers
  1. Ravi Kumar
    Ravi Kumar avatar
    37 posts
    Member since:
    May 2010

    Posted 02 Aug 2010 Link to this post

    Hi

    I,m using raddatepicker. but i want to set default year like "current month 1990".

    Regards
    Ravi
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 02 Aug 2010 Link to this post

    Hi,

    Here is the code snippet to get required result.

    C#:
    protected void Page_Load(object sender, EventArgs e)
    {
        // Set default value for DatePicker
        DateTime dt = new DateTime(1990, DateTime.Now.Month, DateTime.Now.Day);
        RadDatePicker2.FocusedDate = dt;
    }


    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top