Problem Description
Ti.UI.Picker min/max values are not working as expected (doesn't reflect in the running app).
Steps to reproduce
1. Create a new mobile project (Classic Titanium)
2. Replace the content of app.js with this code:
Ti.UI.backgroundColor = 'white';
var win = Ti.UI.createWindow({
});
var picker = Ti.UI.createPicker({
type : Ti.UI.PICKER_TYPE_DATE,
minDate : new Date(1900, 0, 1),
maxDate : new Date(),
value : new Date(),
top : 50
});
win.add(picker);
win.open();
picker.addEventListener('change', function(e) {
Ti.API.info("User selected date: " + e.value.toLocaleString());
});
3. Run this into a browser.
Actual Results
1. setting value property has no effect
2. unwanted borders are added to the date picker.
Expected results
The setting value working as expected.
Tried doing the same here. Setting it's minDate property still allows me to select dates previous to what is selected. iOS 9.1 Ti SDK 5.0.3.v20151002003129
Are you sure, you complied and tested it on mobile web not as iOS app?
Oh, sorry. I didn't see this ticket was for MobileWeb, although i'm having this same issue for iOS 9.1. No matter how i change the minDate/maxDate properties, my picker will still show all possible dates (even before/after what i have used as min/max) .
This Bug still unsolved for after so many years.
This ticket is marked for MobileWeb. If it also happens on iOS, we could change it accordingly and fix it.
Tested on iOS and it works both on creation and after creation:
For Android, TIMOB-25917 was created to be able to change it after creation as well (parity).