Skip to content

Commit e23791b

Browse files
committed
fix: initial value in date field
1 parent d4955aa commit e23791b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/Form/DateField/DateField.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export type DateFieldProps = Simplify<BaseFieldComponentProps<Date> & Omit<DateF
1919
export const DateField = ({ disabled, error, label, name, readOnly, setValue, value }: DateFieldProps) => {
2020
const [isDatePickerOpen, setIsDatePickerOpen] = useState(false);
2121
const [isInputFocused, setIsInputFocused] = useState(false);
22-
const [inputValue, setInputValue] = useState('');
22+
const [inputValue, setInputValue] = useState(value ? toBasicISOString(value) : '');
2323

2424
useEffect(() => {
2525
const isSelecting = isDatePickerOpen || isInputFocused;

0 commit comments

Comments
 (0)