{ "id": "124638", "key": "TIMOB-16173", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "16586", "description": "Release 3.4.2", "name": "Release 3.4.2", "archived": false, "released": true, "releaseDate": "2017-03-11" }, { "id": "16704", "description": "Release 3.5.0", "name": "Release 3.5.0", "archived": false, "released": true, "releaseDate": "2015-01-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-08-21T21:42:01.000+0000", "created": "2014-01-10T09:17:29.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "module_picker", "qe-manualtest", "qe-testadded", "showDatePickerDialog", "showTimePickerDialog" ], "versions": [ { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [], "assignee": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "updated": "2014-11-21T18:49:36.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "The picker completely ignores the minDate and maxDate when shown as dialog. Code to reproduce:\r\n\r\n{code}\r\n var pickerTime = Ti.UI.createPicker({\r\n\t //value: now,\r\n\t value: $.startDateTime.toDate(),\r\n\t type: Titanium.UI.PICKER_TYPE_TIME,\r\n \tmaxDate: new Date(),\r\n\t format24: true\r\n\t});\r\n\t\r\n pickerTime.showTimePickerDialog({format24: true});\r\n{code}\r\n\r\n{code}\r\nvar pickerDate = Ti.UI.createPicker({\r\n value: now,\r\n maxDate: new Date(),\r\n minDate: new Date(),\r\n type: Titanium.UI.PICKER_TYPE_DATE\r\n});\r\n\r\n pickerDate.showDatePickerDialog();\r\n\r\n{code}", "attachment": [ { "id": "51814", "filename": "app.js", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2014-10-06T21:52:54.000+0000", "size": 724, "mimeType": "text/javascript" } ], "flagged": false, "summary": "Android: showDatePickerDialog and showTimePickerDialog ignore minDate and maxDate attributes", "creator": { "name": "janhelleman", "key": "janhelleman", "displayName": "Jan Helleman", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "janhelleman", "key": "janhelleman", "displayName": "Jan Helleman", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Android SDK API 14, Titanium SDK 3.2.0-GA", "comment": { "comments": [ { "id": "287868", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving this ticket to engineering as I was not able to make showDatePickerDialog and showTimePickerDialog work using the simple sample provided in the documentation. Note that adding a date or time picker to a window works fine so the issue is specific to showDatePickerDialog and showTimePickerDialog methods.\r\n\r\nhttp://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.Picker-method-showDatePickerDialog\r\n\r\n{code}\r\nTi.UI.backgroundColor = 'white';\r\nvar win = Ti.UI.createWindow({\r\n exitOnClose: true,\r\n layout: 'vertical'\r\n});\r\n\r\nvar picker = Ti.UI.createPicker({\r\n type:Ti.UI.PICKER_TYPE_DATE,\r\n minDate:new Date(2009,0,1),\r\n maxDate:new Date(2014,11,31),\r\n value:new Date(2014,3,12)\r\n});\r\n\r\nwin.open();\r\n\r\npicker.showDatePickerDialog({\r\n value: new Date(2010,8,1),\r\n callback: function(e) {\r\n if (e.cancel) {\r\n Ti.API.info('User canceled dialog');\r\n } else {\r\n Ti.API.info('User selected date: ' + e.value);\r\n }\r\n }\r\n});\r\n{code}\r\n", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-12T05:56:35.000+0000", "updated": "2014-06-28T14:36:53.000+0000" }, { "id": "311081", "author": { "name": "vkorol", "key": "vkorol", "displayName": "Viktor Korol", "active": true, "timeZone": "Europe/Istanbul" }, "body": "Bug still exist. \r\nPlease fix.", "updateAuthor": { "name": "vkorol", "key": "vkorol", "displayName": "Viktor Korol", "active": true, "timeZone": "Europe/Istanbul" }, "created": "2014-06-26T15:15:38.000+0000", "updated": "2014-06-26T15:15:38.000+0000" }, { "id": "318744", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "3.4.0 is moved forward, and 3.5.0 is taking its place in the calendar.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-14T21:31:56.000+0000", "updated": "2014-08-14T21:31:56.000+0000" }, { "id": "319726", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "https://github.com/appcelerator/titanium_mobile/pull/5977\r\n\r\nAdded support for minDate and maxDate in showDatePickerDialog. Code check the proxy if the minDate, maxDate values are not passed in.", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-08-21T17:09:56.000+0000", "updated": "2014-08-21T17:09:56.000+0000" }, { "id": "327081", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Verified fix on:\r\n\r\nMac OSX 10.9.5\r\nAppcelerator Studio, build: 3.4.0.201409261245\r\nTitanium SDK build: 3.5.0.v20141003114918 \r\nTitanium CLI, build: 3.5.0-dev\r\nAlloy: 1.5.1\r\nAndroid Emulator 4.4.2, Android Device S3 4.0.4\r\n\r\nUsing the attached app.js built to both device and emulator and the minDate and maxDate attributes are respected.\r\n\r\nClosing ticket.", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2014-10-06T21:48:41.000+0000", "updated": "2014-10-06T21:48:41.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }