Steps to reproduce:
1. Use the below code in the app.js:
var win = Ti.UI.createWindow();
var pickerDate = Ti.UI.createPicker({
type: Ti.UI.PICKER_TYPE_DATE
});
var pickDateBtn = Ti.UI.createButton({
title: 'Click!',
height: 200,
width: 250,
top: 50,
left: 50
});
pickDateBtn.addEventListener('click', function() {
pickerDate.showDatePickerDialog({
minDate: new Date(2009, 0, 1),
maxDate: new Date(2015, 11, 31),
value: new Date(2018, 0, 1), //check to see if the value can be set higher than maxDate, should not actually see this value in the app
callback: function(e) {
if (e.cancel) {
Ti.API.info('User canceled dialog');
} else {
Ti.API.info('User selected date: ' + e.value);
}
}
});
});
win.add(pickDateBtn);
win.open();
2. Build for Android device/emulator.
3. After the app is launched tap on click to bring up the calender.
4. Check the date showing in the calendar.
h5Actual result:
1. The date is the date set for the
value
property of the picker.
Expected result:
1. The date showing on the calendar should be the
maxDate
.
PR (master): https://github.com/appcelerator/titanium_mobile/pull/12787
merged to master, backport PR for 10_0_X merged for 10.0.0 GA target