{ "id": "137925", "key": "TIMOB-18268", "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": [], "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2018-03-31T09:43:26.000+0000", "created": "2014-10-10T10:31:16.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "TCSupport", "datepicker", "mobileweb", "picker" ], "versions": [ { "id": "15972", "description": "Release 3.4.0", "name": "Release 3.4.0", "archived": false, "released": true, "releaseDate": "2014-09-28" }, { "id": "16676", "description": "Release 3.4.1", "name": "Release 3.4.1", "archived": false, "released": true, "releaseDate": "2014-11-14" } ], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-03-31T09:43:26.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "11500", "name": "MobileWeb", "description": "Mobile Web (HTML) Platform" } ], "description": "h4. Problem Description\r\nTi.UI.Picker min/max values are not working as expected (doesn't reflect in the running app).\r\n\r\nh4. Steps to reproduce\r\n1. Create a new mobile project (Classic Titanium)\r\n2. Replace the content of app.js with this code:\r\n{code}\r\nTi.UI.backgroundColor = 'white';\r\nvar win = Ti.UI.createWindow({\r\n\t\r\n});\r\n \r\nvar picker = Ti.UI.createPicker({\r\n\ttype : Ti.UI.PICKER_TYPE_DATE,\r\n\tminDate : new Date(1900, 0, 1),\r\n maxDate : new Date(),\r\n value : new Date(),\r\n\ttop : 50\r\n});\r\n \r\nwin.add(picker);\r\nwin.open();\r\n \r\npicker.addEventListener('change', function(e) {\r\n\tTi.API.info(\"User selected date: \" + e.value.toLocaleString());\r\n}); \r\n{code}\r\n3. Run this into a browser.\r\n\r\nh4. Actual Results \r\n1. setting value property has no effect\r\n2. unwanted borders are added to the date picker.\r\n\r\nh4. Expected results\r\nThe setting value working as expected. \r\n", "attachment": [], "flagged": false, "summary": "Titanium.UI.Picker - minDate / maxDate / value properties are not working", "creator": { "name": "mano_mykingdom", "key": "mano_mykingdom", "displayName": "Manojkumar Murugesan", "active": true, "timeZone": "Asia/Kolkata" }, "subtasks": [], "reporter": { "name": "mano_mykingdom", "key": "mano_mykingdom", "displayName": "Manojkumar Murugesan", "active": true, "timeZone": "Asia/Kolkata" }, "environment": "Titanium Studio & SDK : 3.4.0.GA/3.4.1.GA\r\nAlloy 1.5.1\r\nChrome Version 37.0.2062.124", "closedSprints": [ { "id": 1018, "state": "closed", "name": "2018 Sprint 07 SDK", "startDate": "2018-03-25T21:59:36.637Z", "endDate": "2018-04-08T21:59:00.000Z", "completeDate": "2018-04-08T17:55:14.467Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "369198", "author": { "name": "rdperottoni", "key": "rdperottoni", "displayName": "Rodolfo Perottoni", "active": true, "timeZone": "Australia/Brisbane" }, "body": "Tried doing the same here. \r\nSetting it's minDate property still allows me to select dates previous to what is selected.\r\n\r\niOS 9.1\r\nTi SDK 5.0.3.v20151002003129", "updateAuthor": { "name": "rdperottoni", "key": "rdperottoni", "displayName": "Rodolfo Perottoni", "active": true, "timeZone": "Australia/Brisbane" }, "created": "2015-11-06T16:33:53.000+0000", "updated": "2015-11-06T16:33:53.000+0000" }, { "id": "369322", "author": { "name": "mano_mykingdom", "key": "mano_mykingdom", "displayName": "Manojkumar Murugesan", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Are you sure, you complied and tested it on mobile web not as iOS app?", "updateAuthor": { "name": "mano_mykingdom", "key": "mano_mykingdom", "displayName": "Manojkumar Murugesan", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2015-11-07T05:20:17.000+0000", "updated": "2015-11-07T05:20:17.000+0000" }, { "id": "369359", "author": { "name": "rdperottoni", "key": "rdperottoni", "displayName": "Rodolfo Perottoni", "active": true, "timeZone": "Australia/Brisbane" }, "body": "Oh, sorry. I didn't see this ticket was for MobileWeb, although i'm having this same issue for iOS 9.1.\r\n\r\nNo matter how i change the minDate/maxDate properties, my picker will still show all possible dates (even before/after what i have used as min/max) .", "updateAuthor": { "name": "rdperottoni", "key": "rdperottoni", "displayName": "Rodolfo Perottoni", "active": true, "timeZone": "Australia/Brisbane" }, "created": "2015-11-08T22:28:33.000+0000", "updated": "2015-11-08T22:28:33.000+0000" }, { "id": "431638", "author": { "name": "safadig", "key": "safadig", "displayName": "Ghassan", "active": true, "timeZone": "America/Havana" }, "body": "This Bug still unsolved for after so many years.", "updateAuthor": { "name": "safadig", "key": "safadig", "displayName": "Ghassan", "active": true, "timeZone": "America/Havana" }, "created": "2017-12-03T16:07:19.000+0000", "updated": "2017-12-03T16:07:19.000+0000" }, { "id": "436148", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "This ticket is marked for MobileWeb. If it also happens on iOS, we could change it accordingly and fix it.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-03-31T09:19:02.000+0000", "updated": "2018-03-31T09:19:02.000+0000" }, { "id": "436149", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Tested on iOS and it works both on creation and after creation:\r\n{code:js}\r\nTi.UI.backgroundColor = 'white';\r\nvar win = Ti.UI.createWindow({\r\n\t\r\n});\r\n \r\nvar picker = Ti.UI.createPicker({\r\n\ttype : Ti.UI.PICKER_TYPE_DATE,\r\n value : new Date(),\r\n\ttop : 50\r\n});\r\n\r\npicker.minDate = new Date(2017, 0, 1);\r\npicker.maxDate = new Date();\r\n \r\nwin.add(picker);\r\nwin.open();\r\n \r\npicker.addEventListener('change', function(e) {\r\n\tTi.API.info(\"User selected date: \" + e.value.toLocaleString());\r\n}); \r\n{code}\r\nFor Android, TIMOB-25917 was created to be able to change it after creation as well (parity).", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-03-31T09:43:26.000+0000", "updated": "2018-03-31T09:43:26.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }