Set date to RadDateTimePicker in Javascript

2 posts, 0 answers
  1. Abhi Shinde
    Abhi Shinde avatar
    56 posts
    Member since:
    May 2010

    Posted 21 Nov 2011 Link to this post

    How can I set date to RadDateTimePicker?

    In browser it shows following error - 

    TypeError: Object [object Object] has no method 'set_selectedDate'

    My Web method returns date - 

            public static DateTime Calculate(int type, int noMonths, int noDays, int noOfWeeks, System.DateTime DateOfjoin)
                      return DateTime.Now;

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 21 Nov 2011 Link to this post

    Hello Abhi,

    Try the following javascript.
    function OnClientClick()
     var datePicker = $find('<%= RadDateTimePicker1.ClientID %>');
     if (datePicker.isEmpty())
     var date = new Date();

    Also check the following documentation.
    RadDateTimePicker Client Object


Back to Top