fixup better
This commit is contained in:
parent
a975be99e9
commit
c1f672bcf6
|
|
@ -15,5 +15,5 @@ export default function DateField(props) {
|
|||
|
||||
return <Input type="date"
|
||||
value={isValid ? parsedDate.format("YYYY-MM-DD") : ""}
|
||||
onChange={(e)=>onChange(e.target.value ? dayjs(e.target.value).toDate() : null)} {...field} {...restProps} />;
|
||||
onChange={(e)=>onChange({ target: { value: e.target.value ? dayjs(e.target.value).toDate() : null, name: field.name } })} {...field} {...restProps} />;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,6 @@ export default function DateTimeField(props) {
|
|||
value={isValid ? parsedDate.format("YYYY-MM-DDTHH:mm") : ""}
|
||||
onChange={(e)=>{
|
||||
const val = e.target.value;
|
||||
onChange(val ? dayjs(val).toDate() : null);
|
||||
onChange({ target: { value: val ? dayjs(val).toDate() : null, name: field.name } });
|
||||
}} {...field} {...restProps} />;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user