1 | <!doctype html>
|
---|
2 | <html lang="en">
|
---|
3 | <head>
|
---|
4 | <title>Datepicker Visual Test : Datepicker ticket #4240</title>
|
---|
5 | <link rel="stylesheet" href="../visual.css" type="text/css" />
|
---|
6 | <link rel="stylesheet" href="../../../themes/base/ui.all.css" type="text/css">
|
---|
7 | <script type="text/javascript" src="../../../jquery-1.4.1.js"></script>
|
---|
8 | <script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
|
---|
9 | <script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
|
---|
10 | <script type="text/javascript" src="../../../ui/jquery.ui.datepicker.js"></script>
|
---|
11 | <script type="text/javascript">
|
---|
12 | $(function() {
|
---|
13 | $("#destroystart").click(function() {
|
---|
14 | $("#startdate").datepicker('destroy');
|
---|
15 | });
|
---|
16 | $("#destroyend").click(function() {
|
---|
17 | $("#enddate").datepicker('destroy');
|
---|
18 | });
|
---|
19 | $("#disablestart").click(function() {
|
---|
20 | $("#startdate").datepicker('disable');
|
---|
21 | });
|
---|
22 | $("#disableend").click(function() {
|
---|
23 | $("#enddate").datepicker('disable');
|
---|
24 | });
|
---|
25 | $("#enablestart").click(function() {
|
---|
26 | $("#startdate").datepicker('enable');
|
---|
27 | });
|
---|
28 | $("#enableend").click(function() {
|
---|
29 | $("#enddate").datepicker('enable');
|
---|
30 | });
|
---|
31 | });
|
---|
32 | </script>
|
---|
33 | </head>
|
---|
34 | <body>
|
---|
35 |
|
---|
36 | <h1 class="ui-widget-header"><a href="http://dev.jqueryui.com/ticket/4240">#4240 - Datepicker destroy affects other datepickers</a></h1>
|
---|
37 |
|
---|
38 | <input type="text" id="startdate" />
|
---|
39 | <input type="text" id="enddate" />
|
---|
40 | <br /> <br />
|
---|
41 | <input type="button" value="Init Startdate" onclick="$('#startdate').datepicker({showOn: 'both', buttonImage:'calendar.gif', buttonImageOnly:'true'});" />
|
---|
42 | <input type="button" value="Init Enddate" onclick="$('#enddate').datepicker({showOn: 'both', buttonImage:'calendar.gif', buttonImageOnly:'true'});" />
|
---|
43 | <br /> <br />
|
---|
44 | <input type="button" id="destroystart" value="Destroy Startdate" />
|
---|
45 | <input type="button" id="destroyend" value="Destroy Enddate" />
|
---|
46 | <br /> <br />
|
---|
47 | <input type="button" id="enablestart" value="Enable Startdate" />
|
---|
48 | <input type="button" id="enableend" value="Enable Enddate" />
|
---|
49 | <br /> <br />
|
---|
50 | <input type="button" id="disablestart" value="Disable Startdate" />
|
---|
51 | <input type="button" id="disableend" value="Disable Enddate" />
|
---|
52 |
|
---|
53 | </body>
|
---|
54 | </html>
|
---|