Skip to content

Commit

Permalink
Adjust DateField timezone offset
Browse files Browse the repository at this point in the history
  • Loading branch information
estrattonbailey committed Mar 20, 2024
1 parent 0dbc796 commit 6bf97d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/forms/DateField/index.android.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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}
Expand Down
1 change: 1 addition & 0 deletions src/components/forms/DateField/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 6bf97d4

Please sign in to comment.