🐛 améliore le champ d'entrée de date

pull/863/head
Johan Girod 2020-01-28 13:25:33 +01:00
parent 6545281f01
commit 389f77d850
1 changed files with 3 additions and 0 deletions

View File

@ -17,6 +17,9 @@ export default function DateInput({ suggestions, onChange, onSubmit, value }) {
return onChange(null)
}
const [year, month, day] = evt.target.value.split('-')
if (+year < 1700) {
return
}
onChange(`${day}/${month}/${year}`)
},
[onChange]