[TIMOB-10587] iOS: Picker - The getvalue() method for date picker returns incorrect date
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2012-11-06T23:51:58.000+0000 |
Affected Version/s | Release 2.1.2 |
Fix Version/s | 2012 Sprint 23 API, 2012 Sprint 23 |
Components | iOS |
Labels | api, qe-ios082012 |
Reporter | Neha Chhabra |
Assignee | Sabil Rahim |
Created | 2012-08-24T04:37:59.000+0000 |
Updated | 2017-03-17T18:49:23.000+0000 |
Description
The getvalue() method for date picker returns incorrect date.
This is not a regression.It occurs as far as 2.0.1.
Steps to Reproduce:
1. install and launch the app.
2. set the date in the picker.
3. Click on Get value button.
Expected Result:
Selected value(date) should be displayed on console.
Actual Result:
Value (date) that is being returned to the console is one date previous to the selected one.
app.js
var _window = Ti.UI.createWindow({
backgroundColor : '#000',
layout :'vertical',
navBarHidden : true
});
var datePicker = Ti.UI.createPicker({
type: Ti.UI.PICKER_TYPE_DATE,
useSpinner: false
});
datePicker.addEventListener('change', function(e) {
Ti.API.info('change event: value = ' + e.value);
});
var button = Ti.UI.createButton({
title: 'Get value'
});
button.addEventListener('click', function(){
Ti.API.info(datePicker.value);
Ti.API.info(datePicker.getValue());
});
_window.add(datePicker);
_window.add(button);
_window.open();
Cannot reproduce on master Tested on TiSDK master (3.1.0 build 4066332) On iPhone 4S running 5.1 on Xcode 4.5.2 in OSX 10.8
Closing ticket as the issue cannot be reproduced.