import React, { useState } from 'react' import { Modal, Button, Input, ModalDialog, ModalClose, Box, Typography, } from '@mui/joy' function DateModal({ isOpen, onClose, onSave, current, title }) { const [date, setDate] = useState( current ? new Date(current).toISOString().split('T')[0] : null, ) const handleSave = () => { onSave(date) onClose() } return ( {/* */} {title} setDate(e.target.value)} /> ) } export default DateModal