Expected Result
Setting the
locale
property of a date picker, or using picker.setLocale() method, should localize a picker
Stramer posted the following comment on this topic in [this post](
https://github.com/appcelerator/titanium_mobile/pull/1269/files#r389756), "We may be able to file a bug/feature request to support custom localizations on iOS. Instead of setting the locale directly, we can probably set the picker's calendar type."
Actual Result
Does nothing
Test case
Test using the KS:
* Launch Kitchen Sink on Device
* Run Controls > Picker > Date Picker
* Click "Change locale" button to programmatically change to locale "ru"
...or test using the following code:
Titanium.UI.setBackgroundColor('#000');
var win1 = Ti.UI.createWindow({
backgroundColor:'white',
fullscreen:false,
exitOnClose:true
});
var minDate = new Date(2011,11,1);
var maxDate = new Date(2012,11,31);
var value = new Date();
var picker = Ti.UI.createPicker({
locale:'fr',
type:Ti.UI.PICKER_TYPE_DATE_AND_TIME,
minDate:minDate,
maxDate:maxDate,
value:value
});
picker.setLocale('fr');
Ti.API.info('The current picker value is: ' + picker.value)
win1.add(picker);
win1.open();
Proposing we close this as a duplicate of TIMOB 1068.
Duplicate of TIMOB-1068.
Closing ticket as duplicate.