Friday, 2 May 2014

Add A Calendar Date Picker To A Form Using jQuery

Here is an example, try it.

In this code when you click in text box then calender is automatically generated.

 index.html


<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
 <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
   <script>
  $(document).ready(function() {
    $("#datepicker").datepicker();
      });</script>
</head>

<body>
 Date: <input type="text" id="datepicker">
       
</body>
</html>


No comments:

Post a Comment

Printing first 50 Fibonacci numbers Using PHP Program

Fibonacci series is a series of numbers in which each number is the sum of the two preceding numbers. For example. 0 , 1 , 1 , 2 , 3 , 5...