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

Date Picker (Calendar View) on Android 5.0 not detecting selection.

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Component/s: None
    • Environment:

      Description

      Using the example code found in the Kitchen Sink shown below the selection made on the calendar has no effect. The changed event listener doesn't detect any interaction. On Android 5.1 the code works fine. All versions before 5.0 use the Android UI spinner not the 'usespinner:true' version and work fine.

       
      	var minDate = new Date();
      	minDate.setFullYear(2009);
      	minDate.setMonth(0);
      	minDate.setDate(1);
      	
      	var maxDate = new Date();
      	maxDate.setFullYear(2009);
      	maxDate.setMonth(11);
      	maxDate.setDate(31);
      	
      	var value = new Date();
      	value.setFullYear(2009);
      	value.setMonth(0);
      	value.setDate(1);
      	
      	var picker = Ti.UI.createPicker({
      		type:Ti.UI.PICKER_TYPE_DATE,
      		minDate:minDate,
      		maxDate:maxDate,
      		value:value,
      		calendarViewShown: false
      	});
      	
      	// turn on the selection indicator (off by default)
      	picker.selectionIndicator = true;
      	
      	picker_Win.add(picker);
      	
      	var label = Ti.UI.createLabel({
      		text:'Choose a date',
      		top:6,
      		width:'auto',
      		height:'auto',
      		textAlign:'center',
      		color:'white'
      	});
      	picker_Win.add(label);
      	
      	picker.addEventListener('change',function(e)
      	{
      		label.text = e.value.toLocaleString();
      	});
      

        Attachments

          Activity

            People

            • Assignee:
              shossain Shak Hossain
              Reporter:
              paulflood Paul Flood
            • Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Source Code