import { useRef } from 'preact/hooks' import { Icon } from './Icon.jsx' export const DatePicker = ({ date, setDate }) => { const input = useRef() const [year, month, day] = date.split('T')[0].split('-') return (
input.current.showPicker()}> setDate(new Date(e.target.value).toISOString())} />
{day}/{month}/{year}
) }