iPad picker date is not updating to other language (like Korea or Thailand) in my iOS app for iOS11 v11.2.6, its working properly in iOS10.Although my iPad language and region is selected to Thai or Korea.

This is my code


NSDateFormatter *dfPeriod = [[NSDateFormatter alloc] init];

[dfPeriod setDateFormat:REPORT_PERIOD1];


m_dpReportFromDate=[[UIDatePicker alloc]initWithFrame:CGRectMake(25, 55, 300, 200)];

m_dpReportFromDate.datePickerMode=UIDatePickerModeDate;

if(m_strFromDate.length>0)


m_dpReportFromDate.date=[dfPeriod dateFromString:m_strFromDate];


[self.view addSubview:m_dpReportFromDate];

You should avoid using the "setDateFormat:" method ("dateFormat" property) for localized date display. See the documentation:


https://developer.apple.com/documentation/foundation/nsdateformatter/1413514-dateformat


which says:


"You should only set this property when working with fixed format representations, as discussed in Working With Fixed Format Date Representations. For user-visible representations, you should use the dateStyle and timeStyle properties, or the setLocalizedDateFormatFromTemplate: method if your desired format cannot be achieved using the predefined styles; both of these properties and this method provide a localized date representation appropriate for display to the user."

iPad picker date is not updating to other language (like Korea or Thailand) in my iOS app for iOS11 v11.2.6, its working properly in iOS10.Although my iPad language and region is selected to Thai or Korea.
 
 
Q