Set value to datepicker on client side

2 posts, 1 answers
  1. Testing
    Testing avatar
    31 posts
    Member since:
    Nov 2013

    Posted 23 Jan 2014 Link to this post

    Hi,
        How can I set today date to date picker on client side using java script.

    thank you.
  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 23 Jan 2014 Link to this post

    Hi,

    Please have a look into the following JavaScript to set today date to RadDatePicker from client side.

    JavaScript:
    <script type="text/javascript">
        function pageLoad() {
            var today = new Date();
            var date = $find("<%=RadDatePicker1.ClientID %>");
            date.set_selectedDate(today);
        }
    </script>

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