Uploaded image for project: 'Appcelerator - INBOX'
  1. Appcelerator - INBOX
  2. AC-1403

showDatePickerDialog - Runtime Error - Android 2.3 - Ti SDK 3.4.0.GA

    Details

      Description

      When trying to show an Android date picker dialog in an app built with 3.4.0.GA and using version 2.3.7 of Android (Genymotion emulator) a runtime error is displayed.

      TiExceptionHandler: (main) [0,10633] - Message: Uncaught Error: android.app.DatePickerDialog.getDatePicker

      This does not happen if the app is built using 3.3.0.GA for Android 2.3.7 or using 3.4.0.GA for Android 4.2.2.

      Code to reproduce:

      var win = Ti.UI.createWindow({title: "Control Window", backgroundColor: "white", layout: "vertical"});
       
      var bt = Ti.UI.createButton({
      	title: "Show Date Picker",
      	top: 10,
      	height: Ti.UI.SIZE,
      	width: "95%"
      });
       
      var picker = Ti.UI.createPicker({
        	type:Ti.UI.PICKER_TYPE_DATE,
      	minDate:new Date(2009,0,1),
        	maxDate:new Date(2014,11,31),
        	value:new Date(2014,3,12)
      });
       
      bt.addEventListener("click", function(){
      	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);
      	    	}
      	  	}
      	});
      });
       
      win.add( bt );
      win.open();
      

        Attachments

          Activity

            People

            • Assignee:
              rtlechuga Radamantis Torres-Lechuga (Inactive)
              Reporter:
              brownemint Michael Browne
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Integration