Files
openlayers/master/examples/test_SpinWheelDatePicker.html
Éric Lemoine 5d14b9e2d4 Updated
2013-02-20 10:38:25 +01:00

39 lines
1.6 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/>
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>SpinWheel Date Picker</title>
<link href="../themes/common/SpinWheel.css" rel="stylesheet">
<script type="text/javascript" src="../../../dojo/dojo.js" djConfig="parseOnLoad: true"></script>
<style>
#spin1 {
margin: 10px auto;
}
</style>
<script language="JavaScript" type="text/javascript">
dojo.require("dojox.mobile"); // This is a mobile app.
dojo.require("dojox.mobile.parser"); // This mobile app supports running on desktop browsers
dojo.require("dojox.mobile.compat"); // This mobile app uses declarative programming with fast mobile parser
dojo.require("dojox.mobile.deviceTheme");
dojo.require("dojox.mobile.SpinWheelDatePicker");
function gotoToday(){
dijit.byId("spin1").reset();
}
function showSelectedValue() {
var w = dijit.byId("spin1");
console.log(w.slots[0].getValue()+ ":" + w.slots[1].getValue() + ":" + w.slots[2].getValue());
}
</script>
</head>
<body style="visibility:hidden;">
<div dojotype="dojox.mobile.View" selected="true">
<h1 dojoType="dojox.mobile.Heading">
<div dojoType="dojox.mobile.ToolBarButton" onClick="showSelectedValue()" label="OK"></div>
<div dojoType="dojox.mobile.ToolBarButton" onClick="gotoToday()" label="Today"></div>
</h1>
<div id="spin1" dojoType="dojox.mobile.SpinWheelDatePicker"></div>
</div>
</body>
</html>