Opened 6 years ago

Closed 6 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 6 years ago by Adrian Vasiliu

Owner: set to Adrian Vasiliu
Status: newassigned

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

<script type="text/javascript" src="<path_to_dojox_mobile>/deviceTheme.js"></script>

(see http://dojotoolkit.org/reference-guide/1.9/dojox/mobile/deviceTheme.html )

2/ Import directly the css corresponding to the theme.

<link rel="stylesheet" type="text/css" href="<path_to_dojox_mobile/themes/iphone/iphone.css"></link>

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.

comment:2 Changed 6 years ago by Adrian Vasiliu

Resolution: worksforme
Status: assignedclosed
Note: See TracTickets for help on using tickets.