Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3446] iOS: UI.Picker - add support for locale property and setLocale method

GitHub Issuen/a
TypeNew Feature
PriorityTrivial
StatusClosed
ResolutionDuplicate
Resolution Date2012-03-16T13:06:48.000+0000
Affected Version/sRelease 1.7.0, Release 1.8.0.1
Fix Version/sn/a
ComponentsiOS
Labelsreported-1.7.0, training
ReporterNatalie Huynh
AssigneeNeeraj Gupta
Created2011-04-15T03:45:16.000+0000
Updated2017-03-09T21:31:52.000+0000

Description

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();

Comments

  1. Blain Hamon 2012-03-16

    Proposing we close this as a duplicate of TIMOB 1068.
  2. Neeraj Gupta 2012-03-16

    Duplicate of TIMOB-1068.
  3. Lee Morris 2017-03-09

    Closing ticket as duplicate.

JSON Source