-
Notifications
You must be signed in to change notification settings - Fork 186
/
Copy path_TimePicker.html
62 lines (54 loc) · 1.57 KB
/
_TimePicker.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>_TimePicker DOH Test</title>
<script type="text/javascript" src="boilerplate.js"></script>
<script type="text/javascript">
require([
"doh/runner",
"dojo/_base/declare",
"dijit/_TimePicker",
"dojo/domReady!"
], function(doh, declare, _TimePicker){
doh.register("tests", [
function extended_range(){
var t1 = _TimePicker({}, "t1");
t1.set('value', new Date("December 11, 2011 00:09:30"));
doh.is(96, t1.timeMenu.children.length, 'num entries 1');
},
function constraints17250(){
var tp = new (declare(_TimePicker, {
isDisabledDate: function () {
return this.inherited(arguments);
}
}))();
tp.set('constraints', {
constructor: null,
clickableIncrement: 'T01:00:00',
set: function () {
throw new Error('Wrong set called');
}
});
tp.set('value', new Date());
doh.is(24, tp.timeMenu.children.length, 'Increment constraints should be copied but other non-constraint properties should not');
},
function min_max(){
var tp = _TimePicker({
pickerMin: "T09:00:00",
clickableIncrement: "T01:00:00",
pickerMax: "T17:00:00"
});
doh.is(9, tp.timeMenu.children.length, 'num entries');
}
]);
doh.run();
});
</script>
</head>
<body>
<h1 class="testTitle">dijit._TimePicker automated tests (non-robot)</h1>
<label for="t1">t1:</label>
<div id="t1" style="height: 200px; width: 150px; overflow: auto;"></div>
</body>
</html>