1 | <!doctype html>
|
---|
2 | <html lang="en">
|
---|
3 | <head>
|
---|
4 | <title>jQuery UI Datepicker - Format date</title>
|
---|
5 | <link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
|
---|
6 | <script type="text/javascript" src="../../jquery-1.4.1.js"></script>
|
---|
7 | <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
|
---|
8 | <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
|
---|
9 | <script type="text/javascript" src="../../ui/jquery.ui.datepicker.js"></script>
|
---|
10 | <link type="text/css" href="../demos.css" rel="stylesheet" />
|
---|
11 | <script type="text/javascript">
|
---|
12 | $(function() {
|
---|
13 | $("#datepicker").datepicker();
|
---|
14 | $("#format").change(function() { $('#datepicker').datepicker('option', {dateFormat: $(this).val()}); });
|
---|
15 | });
|
---|
16 | </script>
|
---|
17 | </head>
|
---|
18 | <body>
|
---|
19 |
|
---|
20 | <div class="demo">
|
---|
21 |
|
---|
22 | <p>Date: <input type="text" id="datepicker" size="30"/></p>
|
---|
23 |
|
---|
24 | <p>Format options:<br />
|
---|
25 | <select id="format">
|
---|
26 | <option value="mm/dd/yy">Default - mm/dd/yy</option>
|
---|
27 | <option value="yy-mm-dd">ISO 8601 - yy-mm-dd</option>
|
---|
28 | <option value="d M, y">Short - d M, y</option>
|
---|
29 | <option value="d MM, y">Medium - d MM, y</option>
|
---|
30 | <option value="DD, d MM, yy">Full - DD, d MM, yy</option>
|
---|
31 | <option value="'day' d 'of' MM 'in the year' yy">With text - 'day' d 'of' MM 'in the year' yy</option>
|
---|
32 | </select>
|
---|
33 | </p>
|
---|
34 |
|
---|
35 | </div><!-- End demo -->
|
---|
36 |
|
---|
37 | <div class="demo-description">
|
---|
38 |
|
---|
39 | <p>Display date feedback in a variety of ways. Choose a date format from the dropdown, then click on the input and select a date to see it in that format.</p>
|
---|
40 |
|
---|
41 | </div><!-- End demo-description -->
|
---|
42 |
|
---|
43 | </body>
|
---|
44 | </html>
|
---|