Show Month and year selection drop-down box
ChangeMonth and changeYear options can open and close the drop-down box for month and year.
1 <! Doctype html>
2
3
4 <meta charset = "UTF-8"/>
5 <title> jQuery UI Demos </title>
6 <link rel = "stylesheet" href = "themes/trontastic/jquery-ui.css"/>
7 <script src = "scripts/jquery-1.9.1.js"> </script>
8 <script src = "scripts/jquery-ui-1.10.1.custom.js"> </script>
9 <script>
10 $ (function (){
11 $ ("# datepicker"). datepicker ({
12 changeMonth: true,
13 changeYear: true
14 });
15 });
16 </script>
17
18 <body>
19 <p>
20 Date:
21 <input type = "text" id = "datepicker"/>
22 </p>
23 </body>
24
Show multiple months
Option numberOfMonths can be used to control the display of several months at the same time:
1 $ (function (){
2 $ ("# datepicker"). datepicker ({
3 numberOfMonths: 3,
4 showButtonPanel: true
5 });
6 });