diff --git a/src/components/DatePicker.jsx b/src/components/DatePicker.jsx index 7242dfd..46e8256 100644 --- a/src/components/DatePicker.jsx +++ b/src/components/DatePicker.jsx @@ -1,12 +1,19 @@ import { useRef } from 'preact/hooks' import { Icon } from './Icon.jsx' +const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent) + export const DatePicker = ({ date, setDate }) => { const input = useRef() const [year, month, day] = date.split('T')[0].split('-') return ( -
input.current.showPicker()}> +
+ isSafari ? input.current.focus() : input.current.showPicker() + } + >