You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.6 KiB
62 lines
1.6 KiB
<!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>
|
|
|