You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i use the datetime ,i found the value is not the current local time
so i see your github code ,i found you transfer date to ISOString by toISOString function,
but i can set the props "keepOffset" to prevent the transfer
when i set keepOffset true,it did't work
so i see you node_modules source code ,you just delete the props "keepOffset"
i am so angry, your code is different between github and node_module
.......................................................
the github code is below :
formik-antd/src/date-picker/index.tsx
When i use the datetime ,i found the value is not the current local time
so i see your github code ,i found you transfer date to ISOString by toISOString function,
but i can set the props "keepOffset" to prevent the transfer
when i set keepOffset true,it did't work
so i see you node_modules source code ,you just delete the props "keepOffset"
i am so angry, your code is different between github and node_module
.......................................................
the github code is below :
formik-antd/src/date-picker/index.tsx
export const DatePicker = ({
name,
validate,
onChange,
fast,
keepOffset,
...restProps
}: DatePickerProps) => (
{({
field: { value },
form: { setFieldValue, setFieldTouched },
}: FieldProps) => (
<$DatePicker
value={value ? moment(value) : undefined}
onChange={(date, dateString) => {
setFieldValue(name, date ? date.toISOString(keepOffset) : null)
setFieldTouched(name, true, false)
onChange && onChange(date, dateString)
}}
{...restProps}
/>
)}
)
export default DatePicker
the node_module code is
export const DatePicker = ({
name,
validate,
onChange,
fast,
...restProps
}: DatePickerProps) => (
{({
field: { value },
form: { setFieldValue, setFieldTouched },
}: FieldProps) => (
<$DatePicker
value={value ? moment(value) : undefined}
onChange={(date, dateString) => {
setFieldValue(name, date ? date.toISOString() : null)
setFieldTouched(name, true, false)
onChange && onChange(date, dateString)
}}
{...restProps}
/>
)}
)
export default DatePicker
The text was updated successfully, but these errors were encountered: