{ "id": "84527", "key": "TIMOB-8632", "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": "10100", "description": "This issue won't be actioned.", "name": "Won't Do" }, "resolutiondate": "2020-01-10T18:03:46.000+0000", "created": "2012-01-06T09:55:42.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "api" ], "versions": [ { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "issuelinks": [], "assignee": null, "updated": "2020-01-10T18:03:46.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h2. Problem description\r\nInformation displayed in the Pciker ([Titanium.UI.Picker|http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.Picker-object]) it's not the same as its value\r\n\r\nh2. Steps to reproduce and code sample\r\n* Run the code below\r\n* Click on the \"begin\" cell\r\n* Select a date and select a time 8:15 p.m.\r\n* Click on the \"submit\" button\r\n* Click on the \"end\" cell\r\n* The value of the picker is the date / time selected previously. However, the display shows a different time picker (8:45 p.m.)\r\n\r\n{code:land=javascript|title=app.js|borderStyle=solid}\r\n// this sets the background color of the master UIView (when there are no windows/tab groups on it)\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\n// create tab group\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\n\r\n//\r\n// create base UI tab and root window\r\n//\r\nvar win1 = Titanium.UI.createWindow({\r\n\ttitle : 'Tab 1',\r\n\tbackgroundColor : '#fff'\r\n});\r\nvar tab1 = Titanium.UI.createTab({\r\n\ticon : 'KS_nav_views.png',\r\n\ttitle : 'Tab 1',\r\n\twindow : win1\r\n});\r\n\r\nvar begining_date = null;\r\nvar ending_date = null;\r\n\r\nvar begining_date_row = Ti.UI.createTableViewRow({className:'begining_date_row', title:\"begin\", hasChild:true });\r\nvar ending_date_row = Ti.UI.createTableViewRow({className:'ending_date_row', title:\"end\", hasChild:true});\r\n\r\nvar begining_date_value = Ti.UI.createLabel({right:10,height:'auto',width:'auto',text:'',font:{fontSize:3}});\r\nbegining_date_row.add(begining_date_value);\r\nvar ending_date_value = Ti.UI.createLabel({right:10,height:'auto',width:'auto',text:'',font:{fontSize:3}});\r\nending_date_row.add(ending_date_value);\r\n\r\nvar data = [];\r\ndata[0] = Ti.UI.createTableViewSection();\r\ndata[0].add(begining_date_row);\r\ndata[0].add(ending_date_row);\r\n\r\n\t\t\r\nvar tableview = Ti.UI.createTableView({\r\n\tdata:data,\r\n\tstyle: Titanium.UI.iPhone.TableViewStyle.GROUPED,\r\n});\r\n\t\r\nwin1.add(tableview);\r\n\r\n\r\n\r\nfunction open_window_begining_date(title, url, begining_date) {\r\n\tvar win = Ti.UI.createWindow({\r\n\t\ttitle : title,\r\n\t\turl : url,\r\n\t\tbegining_date : begining_date\r\n\t});\r\n\r\n\ttab1.open(win, {\r\n\t\tanimated : true\r\n\t});\r\n}\r\n\r\n\r\ntableview.addEventListener('click', function(e) {\r\n\tif(e.index == 0) {\r\n\t\topen_window_begining_date(\"Begin\", './begining_date.js', begining_date);\r\n\t} else if(e.index == 1) {\r\n\t\topen_window_begining_date(\"End\", './ending_date.js', begining_date);\r\n\t}\r\n});\r\n\r\n\r\nTi.App.addEventListener('update_begining_date', function(d) {\r\n\tvar begining_date_tmp = new Date();\r\n\tbegining_date_tmp.setTime(d.time);\r\n begining_date = begining_date_tmp;\r\n\tbegining_date_value.text = begining_date_tmp;\r\n\ttableview.setData(tableview.data);\r\n});\r\n\r\nTi.App.addEventListener('update_ending_date', function(d) {\r\n\tvar ending_date_tmp = new Date();\r\n\tending_date_tmp.setTime(d.time);\r\n ending_date = ending_date_tmp;\r\n\tending_date_value.text = ending_date_tmp;\r\n\ttableview.setData(tableview.data);\r\n});\r\n\r\ntabGroup.addTab(tab1);\r\n\r\n// open tab group\r\ntabGroup.open();\r\n{code} \r\n\r\n{code:lang=javascript|title=begining_date.js|borderStyle=solid}\r\n\r\nvar current_window = Titanium.UI.currentWindow;\r\n\r\nfunction create_picker(new_date) {\r\n\tdate_picker = Ti.UI.createPicker({\r\n\t\ttop : 70,\r\n\t\ttype : Titanium.UI.PICKER_TYPE_DATE_AND_TIME,\r\n\t\tuseSpinner : true,\r\n\t\tminuteInterval : 15,\r\n\t\tvalue : new_date\r\n\t});\r\n\r\n\tTitanium.API.info(\"Valeur of picker : \" + current_date);\r\n\r\n\tcurrent_window.add(date_picker);\r\n\tsubmit_button = Ti.UI.createButton({\r\n\t\theight : 35,\r\n\t\twidth : 300,\r\n\t\tbottom : 10,\r\n\t\ttitle : 'submit'\r\n\t});\r\n\r\n\tcurrent_window.setRightNavButton(submit_button);\t\r\n}\r\n\r\n\r\nvar current_date = Titanium.UI.currentWindow.begining_date;\r\n\r\ncreate_picker(current_date);\r\n\r\nsubmit_button.addEventListener('click', function() {\r\n\t\r\n\tTi.App.fireEvent('update_begining_date',\r\n\t{\r\n\t\ttime:current_date.getTime()\r\n\t});\r\n\t\r\n\tTi.UI.currentWindow.close();\r\n});\r\n\r\n\r\ndate_picker.addEventListener('change', function(e) {\r\n\t\t\r\n\tcurrent_date = e.value;\r\n\tTitanium.API.info(\"Value of picker (on change) : \" + e.value);\r\n});\r\n{code} \r\n\r\n{code:lang=javaxcript|title=ending.js|borderStyle=solid}\r\n\r\nvar current_window = Titanium.UI.currentWindow;\r\n\r\nfunction create_picker(new_date) {\r\n\tdate_picker = Ti.UI.createPicker({\r\n\t\ttop : 70,\r\n\t\ttype : Titanium.UI.PICKER_TYPE_DATE_AND_TIME,\r\n\t\tuseSpinner : true,\r\n\t\tminuteInterval : 15,\r\n\t\tvalue : new_date\r\n\t});\r\n\r\n\tTitanium.API.info(\"Valeur of picker : \" + current_date);\r\n\r\n\tcurrent_window.add(date_picker);\r\n\tsubmit_button = Ti.UI.createButton({\r\n\t\theight : 35,\r\n\t\twidth : 300,\r\n\t\tbottom : 10,\r\n\t\ttitle : 'submit'\r\n\t});\r\n\r\n\tcurrent_window.setRightNavButton(submit_button);\t\r\n}\r\n\r\n\r\nvar current_date = new Date();\r\n\r\nif (Titanium.UI.currentWindow.begining_date != null) {\r\n\tcurrent_date = Titanium.UI.currentWindow.begining_date;\r\n}\r\n\r\ncreate_picker(current_date);\r\n\r\n\r\nsubmit_button.addEventListener('click', function() {\r\n\t\r\n\tTi.App.fireEvent('update_ending_date',\r\n\t{\r\n\t\ttime:current_date.getTime()\r\n\t});\r\n\t\r\n\tTi.UI.currentWindow.close();\r\n});\r\n\r\n\r\ndate_picker.addEventListener('change', function(e) {\r\n\t\t\r\n\tcurrent_date = e.value;\r\n\tTitanium.API.info(\"Value of picker (on change) : \" + e.value);\r\n});\r\n{code} \r\n", "attachment": [], "flagged": false, "summary": "iOS: The display of the picker is not the same as its value", "creator": { "name": "toutspeed", "key": "toutspeed", "displayName": "Anthony", "active": true, "timeZone": "Europe/Paris" }, "subtasks": [], "reporter": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "* Titanium Mobile 1.8.0.1 (12/22/11 13:09 fbdc96f)\r\n* iOS 4.3.2\r\n* iphone simulator\r\n* MacOSX Snow Leopard", "comment": { "comments": [ { "id": "178361", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Anthony\r\n\r\nWhile your ticket is in a perfect format, and I thank you for that, the test case is very complex. In order to determine the cause of this issue, and prove that it is not a problem with your code, please read [Creating a Test Case|https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-CreatingaTestCase], and remove all unnecessary code.\r\n\r\nOnce you do this, I will be able to escalate it.\r\n\r\nThanks", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2012-01-06T10:32:28.000+0000", "updated": "2012-01-06T10:32:28.000+0000" }, { "id": "178365", "author": { "name": "toutspeed", "key": "toutspeed", "displayName": "Anthony", "active": true, "timeZone": "Europe/Paris" }, "body": "Paul,\r\n\r\nI can not do less for this test case (if the bug is not reproducible) ...\r\nI have already greatly reduced my code.\r\n\r\nThanks\r\n", "updateAuthor": { "name": "toutspeed", "key": "toutspeed", "displayName": "Anthony", "active": true, "timeZone": "Europe/Paris" }, "created": "2012-01-06T10:50:38.000+0000", "updated": "2012-01-06T10:50:38.000+0000" }, { "id": "178378", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "To reproduce the issue...\r\n\r\nDo you need a tabgroup? \r\nDo you need a tableview?\r\nDo you need to open new windows?\r\n\r\nIf each of these, if you do, then this needs to be stated as part of the problem. If not, then please remove them from the test case.\r\n\r\nThank you", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2012-01-06T11:48:04.000+0000", "updated": "2012-01-06T11:48:04.000+0000" }, { "id": "179180", "author": { "name": "toutspeed", "key": "toutspeed", "displayName": "Anthony", "active": true, "timeZone": "Europe/Paris" }, "body": "Yes i need ... \r\nIt's very important for me. \r\n\r\nThanks", "updateAuthor": { "name": "toutspeed", "key": "toutspeed", "displayName": "Anthony", "active": true, "timeZone": "Europe/Paris" }, "created": "2012-01-13T07:58:43.000+0000", "updated": "2012-01-13T07:58:43.000+0000" }, { "id": "179325", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Anthony\r\n\r\nMy apologies, that is not what I meant, although the [Creating a Test Case|https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-CreatingaTestCase] guide explains it in full.\r\n\r\nIn order to create a test case, remove the tabgroup, tableview and new windows one by one. If the problem still exists, then these elements are not needed, so please remove them from the code above. Also avoid using the window.url property.\r\n\r\nThen I can escalate this issue.\r\n\r\nThanks", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2012-01-15T08:56:07.000+0000", "updated": "2012-01-15T08:56:07.000+0000" }, { "id": "453643", "author": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This issue is out of date with our current supported SDK release (7.5.2.GA as of the date of closure), and out of date with mobile OS versions. \r\n\r\nIf community members feel that the issue is still valid, please create a new ticket. Please reference this closed ticket number, include SDK used, comments, and code that demonstrates/reproduces the issue.", "updateAuthor": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-01-10T18:03:46.000+0000", "updated": "2020-01-10T18:03:46.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }