Show Hebrew Months in UIDatePicker?

2019-08-10 20:18发布

问题:

Is there a way to show hebrew month names in a UIDatePicker instead of Gregorian ones? How? Can this be set programmatically?

回答1:

There is a bug in UIDatePicker that prevents it from correctly honoring the calendar property (which is how you're supposed to do this). Please file a bug report and it will be fixed.



回答2:

If you are using IB to create your view you can add a UIDatePicker and set its Locale property to "Hebrew".



回答3:

I don't think that is possible, however you can create your own UIPickerView to display hebrew months instead.

It looks like UIDatePicker has this property but has now been deprecated for ios 5.0

locale
The locale used by the date picker. (Deprecated in iOS 5.0.)

@property(nonatomic, retain) NSLocale *locale