Browse Source

fix: wrong default timezone in modal mode (#411)

master
Henning Hall 3 years ago
committed by GitHub
parent
commit
f733d4acf3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      ios/RNDatePicker/RNDatePickerManager.m

+ 4
- 2
ios/RNDatePicker/RNDatePickerManager.m View File

@ -109,8 +109,10 @@ RCT_EXPORT_METHOD(openPicker:(NSDictionary *) props
int minuteInterval = [RCTConvert int:[props objectForKey:@"minuteInterval"]];
[picker setMinuteInterval:minuteInterval];
NSTimeZone* timezone = [RCTConvert NSTimeZone:[props valueForKey:@"timeZoneOffsetInMinutes"]];
[picker setTimeZone:timezone];
NSString * timeZoneProp = [props valueForKey:@"timeZoneOffsetInMinutes"];
if(timeZoneProp){
[picker setTimeZone:[RCTConvert NSTimeZone:timeZoneProp]];
}
[alertView addSubview:picker];

Loading…
Cancel
Save