Skip to content

Commit aff0983

Browse files
if timezoneOffset is undefined, pass null to the iOS dateTime picker. Without doing this, behaviour becomes unpredictable and the incorrect date can be returned.
1 parent 58ed2b1 commit aff0983

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

datepicker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ class DatePicker extends Component {
391391
maximumDate={maxDate && this.getDate(maxDate)}
392392
onDateChange={this.onDateChange}
393393
minuteInterval={minuteInterval}
394-
timeZoneOffsetInMinutes={timeZoneOffsetInMinutes}
394+
timeZoneOffsetInMinutes={timeZoneOffsetInMinutes ? timeZoneOffsetInMinutes : null}
395395
style={[Style.datePicker, customStyles.datePicker]}
396396
/>
397397
</View>

0 commit comments

Comments
 (0)