root / trunk / tests / widget / test_DropdownDatePicker.html

Revision 7542, 4.4 kB (checked in by ktiedt, 21 months ago)

Fixes #1694 Fixes #1692
Finally found and fixed these 2 bugs... Test case updated to remove the "known bug" test case text.

  • Property svn:eol-style set to native
Line 
1<html>
2<head>
3        <script type="text/javascript">
4                var djConfig = { isDebug: true,
5                                                 extraLocale: ['en-us', 'de', 'nl', 'ja', 'zh-cn', 'zh-tw']
6                                                };
7        </script>
8        <script type="text/javascript" src="../../dojo.js"></script>
9        <script type="text/javascript">
10                dojo.require("dojo.widget.DropdownDatePicker");
11                dojo.require("dojo.widget.Button");
12                function outputValues(form){
13                        for(var i=0;i<form.elements.length;i++){
14                                var e = form.elements[i];
15                                dojo.debug("submit: name="+e.name+" id="+e.id+" value="+e.value);
16                        }
17                        return false;
18                }
19        </script>
20
21        <style>
22                html, body {
23                        width: 100%;
24                        height: 100%;
25                }
26        </style>
27</head>
28<body>
29        <h1> DropDownDatePicker tests </h1>
30        <p>
31                Here are some date pickers positioned statically.
32                Drop down should appear below the input box.
33        </p>
34        <p>
35        Wipe:
36        <input dojoType="dropdowndatepicker" startDate="2006-10-25" endDate="2006-11-05" value="2006-10-31" containerToggle="wipe" containerToggleDuration="300">
37        Explode:
38        <input dojoType="dropdowndatepicker" value="2006-07-22" containerToggle="explode" containerToggleDuration="500">
39        Fade:
40        <input dojoType="dropdowndatepicker" value="2006-06-30" containerToggle="fade" containerToggleDuration="500">
41        </p>
42        <p>
43                <input id="enabler" type="checkbox" onchange="dojo.widget.byId('bar')[this.checked ? 'enable' : 'disable']();" />
44                <label for="enabler">enable</label>
45                <input id="bar" dojoType="dropdowndatepicker" value="2006-10-31" disabled>
46        </p>   
47        <p>There are also tests for menu positioning in the corners of this page (upper right, lower right</p>
48        <div style="position: absolute; right: 0; top: 0;">
49                <input dojoType="dropdowndatepicker" value="2006-07-10" containerToggle="fade">
50        </div>
51        <div style="position: absolute; right: 0; bottom: 0;">
52                <input dojoType="dropdowndatepicker" value="2006-07-22" containerToggle="fade">
53        </div>
54
55        <div><select><option>taking up space</option></select></div>
56
57        <div style="border:3px solid blue;padding:1px;">
58                <p>Some localized DropdatePickers inside a form</p>
59                <form onSubmit="return outputValues(this);">
60                        <p>Parser is barfing here in Eclipse+Safari.  Why? value="today"</p>
61                                <input name="dddp1" dojoType="dropdowndatepicker" value="today" />
62                        <p>US format, empty</p>
63                                <input name="dddp2" dojoType="dropdowndatepicker" lang="en-us" />
64                        <p>US format with initial date of 2006-06-26</p>
65                                <input name="dddp3" dojoType="dropdowndatepicker" value="2006-06-26" lang="en-us" />
66                        <p>With initial date of 1969-04-25 and a custom format dd/MM/yyyy</p>
67                                <input name="dddp5" dojoType="dropdowndatepicker" inputName="mydate1" value="1969-04-25" displayFormat="dd/MM/yyyy" />
68                        <p>In German:</p>
69                                <input name="dddp7" dojoType="dropdowndatepicker" value="2006-06-28" lang="de" />
70                        <p>In Dutch:</p>
71                                <input name="dddp8" dojoType="dropdowndatepicker" value="2006-06-28" lang="nl" />
72                        <p>In Japanese:</p>
73                                <input name="dddp9" dojoType="dropdowndatepicker" value="2006-06-28" lang="ja" />
74                        <p>In Chinese (PRC):</p>
75                                <input name="dddp10" dojoType="dropdowndatepicker" value="2006-06-28" lang="zh-cn" />
76                        <p>In Chinese (Taiwan):</p>
77                                <input name="dddp11" dojoType="dropdowndatepicker" value="2006-06-28" lang="zh-tw" />
78                        <p>US format with initial date of 2006-06-26 and long formatting (parse not supported)</p>
79                                <input name="dddp12" dojoType="dropdowndatepicker" value="2006-06-26" formatLength="long" lang="en-us" />
80                        <p>German format with initial date of 2006-06-26 and long formatting (parse not supported)</p>
81                                <input name="dddp13" dojoType="dropdowndatepicker" value="2006-06-26" formatLength="long" lang="de" />
82                        <p>Value sent as RFC3339</p>
83                                <input name="dddp14" dojoType="dropdowndatepicker" saveFormat="rfc" value="2006-06-26" lang="en-us" />
84                        <p>Custom save format: yyyy!dd!mm</p>
85                                <input name="dddp15" dojoType="dropdowndatepicker" saveFormat="yyyy!dd!MM" value="2006-06-26" lang="en-us" />
86                        <p>Value sent as time since Unix Epoch</p>
87                                <input name="dddp16" dojoType="dropdowndatepicker" saveFormat="posix" value="2006-06-26" lang="en-us" />
88                        <br />
89                        <input type="submit" />
90                </form>
91        </div> 
92    <br />
93        Wipe: with startDate="2006-10-10"
94        <input dojoType="dropdowndatepicker" startDate="2006-10-10" containerToggle="wipe" containerToggleDuration="300">
95        <br />
96        Explode: testing invalid initial value of "oiwerwerw"
97        <input dojoType="dropdowndatepicker" value="oiwerwerw" containerToggle="explode" containerToggleDuration="500">
98        <br /><br />
99        </body>
100</html>
Note: See TracBrowser for help on using the browser.