UIDatePicker strange behaviour with Islamic calendar
Originator: | MIH1406 | ||
Number: | rdar://29265429 | Date Originated: | 15-Nov-2016 |
Status: | Open | Resolved: | |
Product: | iOS SDK | Product Version: | All |
Classification: | Serious | Reproducible: | Always |
Summary: UIDatePicker when I give it calendar with islamicUmmAlQura it gives me a strange behaviour. The days starts from 1 to 30 but there is a '2' above 1 and below 30 such that days are as follows 2,1,2,3,4 ... 30 this strange behaviour occurs with all months. Please see attached screenshots. Steps to Reproduce: 1. Create Single View Application for iOS project with any XCode version. 2. Paste the following code inside viewDidLoad method for your ControllerView class. 3. Run the app in Simulator or iPhone device. 4. Scroll to first day of any months in the UIDatePicker The code to be pasted: let picker = UIDatePicker(frame: CGRect(x: 0, y: 30, width: 0, height: 0)) picker.datePickerMode = .date picker.date = Date() picker.calendar = Calendar(identifier: .islamicUmmAlQura) picker.autoresizingMask = UIViewAutoresizing.flexibleRightMargin picker.frame.size.width = 300 view.addSubview(picker) Expected Results: For each month in the UIDatePicker, days should start from 1 ... 29 or 30 as per all islamic calendars. (1, 2, 3, 4, 5 ... 29 or 30) Actual Results: For each month in the UIDatePicker, days are starting strangley from 2 then 1 ... 29 or 30. (2, 1, 2, 3, 4, 5 ... 29 or 30) Yes, there is a 2 digit before 1 and after 30 (or 29 if month is not 30 days). Version: Xcode 8.1 and Xcode 8 and Xcode 7 Notes: Configuration: iPhone 6, iPhone 5 and Simulators Attached photo: https://i.stack.imgur.com/JYMae.png
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!