Opened 8 years ago
Closed 7 years ago
#17330 closed defect (worksforme)
SpinWheelDatePicker TypeError: dateObject is null
Reported by: | Rombs | Owned by: | Adrian Vasiliu |
---|---|---|---|
Priority: | undecided | Milestone: | tbd |
Component: | DojoX Mobile | Version: | 1.9.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
I have error in this test page.
<!DOCTYPE html> <html> <head>
<title>iFacade</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <meta name="apple-mobile-web-app-capable" content="yes"> <script type="text/javascript">
var dojoConfig = {
async: true, mblUserAgent: "iPhone", };
</script> <script type="text/javascript" src="/domjs/dojo-1.9.1/dojo/dojo.js"></script>
</head> <body> <script type="text/javascript">
require([
"dojo/_base/window", "dojo/ready", "dojox/mobile/SpinWheelDatePicker", "dojox/mobile/parser"
], function(win, ready, SpinWheelDatePicker?){
var widget = new SpinWheelDatePicker?({id:"spin1"}); win.body().appendChild(widget.domNode); widget.startup();
});
</script> </body> </html>
Cann't understand why or find solution.
Change History (2)
comment:1 Changed 7 years ago by
Owner: | set to Adrian Vasiliu |
---|---|
Status: | new → assigned |
comment:2 Changed 7 years ago by
Resolution: | → worksforme |
---|---|
Status: | assigned → closed |
Your code misses to load the Dojo Mobile CSS stuff, and in my tests with a couple of different browsers fixing this issue removes the error.
With Dojo 1.9+ (and 1.8) you can either:
1/ Import dojox/mobile/deviceTheme.js
(see http://dojotoolkit.org/reference-guide/1.9/dojox/mobile/deviceTheme.html )
2/ Import directly the css corresponding to the theme.
Also, you you want to support non-webkit browsers, you should require the "dojox/mobile/compat" module (see http://dojotoolkit.org/reference-guide/1.9/dojox/mobile/cross-browser-support.html).
Therefore, I'm closing the ticket. In case you would still get an error after fixing your code, please provide an updated code to reproduce and indicate the browser / device / OS version where you get the error.