Jquery datepicker set value in textbox

Jquery datepicker 

Today I going to show you how you set value in textbox using Jquery date picker in asp.net or any other control (like HTML). Here we take a simple HTML textbox to pick date using Jquery UI , in this process we use 3 ajax-offical script link.
Here we match the id of HTML Textbox (id="datepick") with the jquery id selector.


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.js" type="text/javascript"></script>
    <script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.16/jquery-ui.js" type="text/javascript"></script>
    <link href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.16/themes/humanity/jquery-ui.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        $(function () {
            $("[id$=datepick]").datepicker();

        });
    </script>
</head>
<body>
    <form>
        <div>
            Date:
            <input type="text" id="datepick" />
        </div>
    </form>
</body>
</html>

Previous
Next Post »