Adjust DateField timezone offset
parent
0dbc796ff6
commit
6bf97d4fd5
|
@ -1,7 +1,6 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import DatePicker from 'react-native-date-picker'
|
import DatePicker from 'react-native-date-picker'
|
||||||
|
|
||||||
import {isAndroid} from 'platform/detection'
|
|
||||||
import {useTheme} from '#/alf'
|
import {useTheme} from '#/alf'
|
||||||
import {DateFieldProps} from '#/components/forms/DateField/types'
|
import {DateFieldProps} from '#/components/forms/DateField/types'
|
||||||
import {toSimpleDateString} from '#/components/forms/DateField/utils'
|
import {toSimpleDateString} from '#/components/forms/DateField/utils'
|
||||||
|
@ -52,8 +51,9 @@ export function DateField({
|
||||||
|
|
||||||
{open && (
|
{open && (
|
||||||
<DatePicker
|
<DatePicker
|
||||||
modal={isAndroid}
|
modal
|
||||||
open={isAndroid}
|
open
|
||||||
|
timeZoneOffsetInMinutes={0}
|
||||||
theme={t.name === 'light' ? 'light' : 'dark'}
|
theme={t.name === 'light' ? 'light' : 'dark'}
|
||||||
date={new Date(value)}
|
date={new Date(value)}
|
||||||
onConfirm={onChangeInternal}
|
onConfirm={onChangeInternal}
|
||||||
|
|
|
@ -59,6 +59,7 @@ export function DateField({
|
||||||
<View style={a.gap_lg}>
|
<View style={a.gap_lg}>
|
||||||
<View style={[a.relative, a.w_full, a.align_center]}>
|
<View style={[a.relative, a.w_full, a.align_center]}>
|
||||||
<DatePicker
|
<DatePicker
|
||||||
|
timeZoneOffsetInMinutes={0}
|
||||||
theme={t.name === 'light' ? 'light' : 'dark'}
|
theme={t.name === 'light' ? 'light' : 'dark'}
|
||||||
date={new Date(value)}
|
date={new Date(value)}
|
||||||
onDateChange={onChangeInternal}
|
onDateChange={onChangeInternal}
|
||||||
|
|
Loading…
Reference in New Issue