UNPKG

dojox

Version:

Dojo eXtensions, a rollup of many useful sub-projects and varying states of maturity – from very stable and robust, to alpha and experimental. See individual projects contain README files for details.

51 lines (47 loc) 1.64 kB
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8"/> <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>DatePicker</title> <script type="text/javascript" src="../deviceTheme.js" data-dojo-config="mblThemeFiles: ['base','DatePicker']"></script> <script type="text/javascript" src="../../../dojo/dojo.js" data-dojo-config="async: true, parseOnLoad: true"></script> <script type="text/javascript"> require([ "dijit/registry", "dojox/mobile/parser", "dojox/mobile", "dojox/mobile/compat", "dojox/mobile/DatePicker" ], function(registry){ gotoToday = function(){ registry.byId("picker1").reset(); } showSelectedValue = function(){ var w = registry.byId("picker1"); document.getElementById("msg").innerHTML = w.slots[0].get("value")+ ":" + w.slots[1].get("value") + ":" + w.slots[2].get("value"); } }); </script> <style> #picker1 { margin: 20px; } .windows_theme #picker1 { margin: 20px 0px; } </style> </head> <body style="visibility:hidden;"> <div data-dojo-type="dojox.mobile.View"> <div data-dojo-type="dojox.mobile.Heading"> <span data-dojo-type="dojox.mobile.ToolBarButton" onClick="showSelectedValue()" data-dojo-props='label:"OK"'></span> <span data-dojo-type="dojox.mobile.ToolBarButton" onClick="gotoToday()" data-dojo-props='label:"Today"'></span> </div> <div id="picker1" data-dojo-type="dojox.mobile.DatePicker"></div> <div id="msg"></div> </div> </body> </html>