From 36aecc32e66ee77e3dc9a1b3eb4558a868cd4730 Mon Sep 17 00:00:00 2001 From: Henning Hall Date: Fri, 20 Aug 2021 11:09:44 +0200 Subject: [PATCH] fix: only allow gregorian calendar (#364) --- ios/RNDatePicker/DatePicker.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ios/RNDatePicker/DatePicker.m b/ios/RNDatePicker/DatePicker.m index a37dc421..ebe32fe7 100644 --- a/ios/RNDatePicker/DatePicker.m +++ b/ios/RNDatePicker/DatePicker.m @@ -58,6 +58,9 @@ - (instancetype)initWithFrame:(CGRect)frame self.preferredDatePickerStyle = UIDatePickerStyleWheels; } _reactMinuteInterval = 1; + + // only allow gregorian calendar + self.calendar = [NSCalendar calendarWithIdentifier:NSCalendarIdentifierGregorian]; } return self; }