DatePicker

2 posts, 0 answers
  1. Rathan
    Rathan avatar
    20 posts
    Member since:
    Oct 2011

    Posted 25 Jun 2012 Link to this post


    HI,


         This is Rathan .Am using the Datetime picker control, i want to  assign the data from variable  to datepicker control using javascript function like below.
      var expdate= t_day+"/"+t_month+"/"+t_year ;
    Here i want  to bind the above variable data to date pickercontrol in javascript function.
    so please let me know .


    Thank you .
  2. Kevin
    Kevin avatar
    360 posts
    Member since:
    Jul 2012

    Posted 25 Jun 2012 Link to this post

    Hello Rathan,

    You would do something like so:

    var expdate = new Date(t_year, t_month - 1, t_day);
    $find("<%=RadDatePicker1.ClientID%>").set_selectedDate(expdate);

    I subtract the month by 1 as the Date contructor only accepts values from 0 - 11, where 0 is January.

    I hope that helps.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top