{ "id": "137536", "key": "AC-1403", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-06-26T22:55:56.000+0000", "created": "2014-10-01T12:49:56.000+0000", "labels": [ "3.4.0", "Android", "TCSupportTriage", "datepicker" ], "versions": [], "issuelinks": [], "assignee": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "updated": "2016-03-08T07:37:49.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "When trying to show an Android date picker dialog in an app built with 3.4.0.GA and using version 2.3.7 of Android (Genymotion emulator) a runtime error is displayed.\r\n\r\n{quote}\r\nTiExceptionHandler: (main) [0,10633] - Message: Uncaught Error: android.app.DatePickerDialog.getDatePicker\r\n{quote}\r\n\r\nThis does not happen if the app is built using 3.3.0.GA for Android 2.3.7 or using 3.4.0.GA for Android 4.2.2.\r\n\r\nCode to reproduce:\r\n\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({title: \"Control Window\", backgroundColor: \"white\", layout: \"vertical\"});\r\n\r\nvar bt = Ti.UI.createButton({\r\n\ttitle: \"Show Date Picker\",\r\n\ttop: 10,\r\n\theight: Ti.UI.SIZE,\r\n\twidth: \"95%\"\r\n});\r\n\r\nvar picker = Ti.UI.createPicker({\r\n \ttype:Ti.UI.PICKER_TYPE_DATE,\r\n\tminDate:new Date(2009,0,1),\r\n \tmaxDate:new Date(2014,11,31),\r\n \tvalue:new Date(2014,3,12)\r\n});\r\n\r\nbt.addEventListener(\"click\", function(){\r\n\tpicker.showDatePickerDialog({\r\n\t \tvalue: new Date(2010,8,1),\r\n\t \tcallback: function(e) {\r\n\t \tif (e.cancel) {\r\n\t \t\tTi.API.info('User canceled dialog');\r\n\t \t} else {\r\n\t \t\tTi.API.info('User selected date: ' + e.value);\r\n\t \t}\r\n\t \t}\r\n\t});\r\n});\r\n\r\nwin.add( bt );\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "showDatePickerDialog - Runtime Error - Android 2.3 - Ti SDK 3.4.0.GA", "creator": { "name": "brownemint", "key": "brownemint", "displayName": "Michael Browne", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "brownemint", "key": "brownemint", "displayName": "Michael Browne", "active": true, "timeZone": "Europe/London" }, "environment": "Mac OSX 10.9.5, CLI version 3.4.0, Titanium SDK version 3.4.0.GA", "comment": { "comments": [ { "id": "334020", "author": { "name": "mano.mykingdom", "key": "mano.mykingdom", "displayName": "Manoj Kumar", "active": true, "timeZone": "Asia/Kolkata" }, "body": "I'm facing the same issue. It seems the problem is with setting minDate and maxDate in 2.3 devices. So I get the os major version, if it is > 2 then set those properties otherwise don't. But this should be handled in PickerProxy. ", "updateAuthor": { "name": "mano.mykingdom", "key": "mano.mykingdom", "displayName": "Manoj Kumar", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-11-27T11:13:27.000+0000", "updated": "2014-11-27T11:13:27.000+0000" }, { "id": "356133", "author": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "body": "Works as expected using SDK 4.0.0 ", "updateAuthor": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "created": "2015-06-26T22:55:56.000+0000", "updated": "2015-06-26T22:55:56.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }