Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-6956] Android: showDatePickerDialog() is broken in 1.8.0.1 v8

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-03-11T22:29:43.000+0000
Affected Version/sRelease 1.8.0.1
Fix Version/sSprint 2012-02, Release 2.0.0, Release 1.8.1
ComponentsAndroid
Labelsmodule_picker, qe-testadded, regression
ReporterPedro Enrique
AssigneeOpie Cyrus
Created2012-01-02T21:12:52.000+0000
Updated2013-12-06T10:27:03.000+0000

Description

The Problem:

This code works on Ti versions prior ti V8.
var picker = Ti.UI.createPicker();
picker.showDatePickerDialog({
	value: new Date(2010,8,1),
	callback: function(e) {
		if (e.cancel) {
			Ti.API.info('user canceled dialog');
		} else {
			Ti.API.info('user selected date: ' + e.value);
		}
	}
});
But no I get an error:
Uncaught Error: java.util.HashMap

Comments

  1. Opie Cyrus 2012-01-05

    Full test:
       var w = Ti.UI.createWindow({backgroundColor:'green'});
       w.open();
       
       var picker = Ti.UI.createPicker();
       picker.showDatePickerDialog({
       	value: new Date(2010,8,1),
       	callback: function(e) {
       		if (e.cancel) {
       			Ti.API.info('user canceled dialog');
       		} else {
       			Ti.API.info('user selected date: ' + e.value);
       		}
       	}
       });
       
    Dialog can still get hidden under HW window but that is a larger behavioral issue beyond the scope of this ticket.
  2. Ivan Skugor 2012-01-09

    Could this method be documented? https://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.Picker-object It's not present in KitchenSink examples (as far as I can see).
  3. Opie Cyrus 2012-01-16

    Verified already pulled into master, setting status to fixed
  4. Opie Cyrus 2012-01-16

    @Ivan I am opening a doc request for this, thanks.
  5. Ivan Skugor 2012-01-16

    Thanks for that Opie, but one is already opened (see linked issues in this ticket).
  6. Eric Merriman 2012-01-19

    Verified fixed with SDK 1.9.0.v20120119131634 on Nexus S (2.3.6) and emulator 2.3.1.
  7. Natalie Huynh 2012-02-01

    Open to update label
  8. Gale Shafer 2012-02-28

    This same issue applies to .showTimePickerDialog()
  9. Gale Shafer 2012-02-28

  10. jithinpv 2013-12-06

    Anvil test case added. PR Link: https://github.com/appcelerator/titanium_mobile/pull/5078

JSON Source