[TIMOB-2012] iOS: Datepicker returns null value
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2012-03-14T13:41:37.000+0000 |
Affected Version/s | Release 1.5.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | parity |
Reporter | Fernando |
Assignee | Stephen Tramer |
Created | 2011-04-15T03:08:04.000+0000 |
Updated | 2012-03-14T13:41:37.000+0000 |
Description
I'm running:
Titanium SDK Version: 1.4.0
Iphone SDK Version: 3.2/4.0
Titanium Developer: 1.2.1
Unfortunately i cannot use this simple code to get the value of a datepicker:
var myDatePicker = Ti.UI.createPicker({
type:Ti.UI.PICKER_TYPE_DATE_AND_TIME,
top: 0
});
debug( myDatePicker.value ); // returns null
KitchenSink shows how to get the value with an event ( and it works! ), but not when you need it outside an datepicker's event.
I've also seen this issue.
The workaround is manually updating the picker's value inside an onChange callback:
Continuously get 'null' using the following sample code - maybe another Apple bug regarding the date picker? Wouldn't be the first time.
This issue does not occur for the following environment: * 1.8.0.1 (12/22/11 13:09 fbdc96f) * iOS 4.3.2 * iphone simulator
Steve Please would you take a look at my last comment? Can this ticket be closed now? Thanks
Cannot reproduce in 1.9.0.d9bac09.
Tested with 1.9.0.v20120112104633
Reopening/closing to add/remove labels