Adjust DateField timezone offset

zio/stable
Eric Bailey 2024-03-20 17:44:31 -05:00
parent 0dbc796ff6
commit 6bf97d4fd5
2 changed files with 4 additions and 3 deletions

View File

@ -1,7 +1,6 @@
import React from 'react'
import DatePicker from 'react-native-date-picker'
import {isAndroid} from 'platform/detection'
import {useTheme} from '#/alf'
import {DateFieldProps} from '#/components/forms/DateField/types'
import {toSimpleDateString} from '#/components/forms/DateField/utils'
@ -52,8 +51,9 @@ export function DateField({
{open && (
<DatePicker
modal={isAndroid}
open={isAndroid}
modal
open
timeZoneOffsetInMinutes={0}
theme={t.name === 'light' ? 'light' : 'dark'}
date={new Date(value)}
onConfirm={onChangeInternal}

View File

@ -59,6 +59,7 @@ export function DateField({
<View style={a.gap_lg}>
<View style={[a.relative, a.w_full, a.align_center]}>
<DatePicker
timeZoneOffsetInMinutes={0}
theme={t.name === 'light' ? 'light' : 'dark'}
date={new Date(value)}
onDateChange={onChangeInternal}