SoftwareBrothers / adminjs-design-system

DesignSystem on which AdminJS is based on
28 stars 33 forks source link

When using keyboard the Datepicker autocompletes with different date #20

Closed pjsteele closed 2 years ago

pjsteele commented 2 years ago

Describe the bug If you enter an 11 or any value below 13, the date picker generates a strange date. e.g. Enter 11 the value will change to 1100-01-01.

Installed libraries and their versions

To Reproduce Steps to reproduce the behavior:

  1. Create a Resource with a Date Field
  2. Edit or Filter using AdminJS ]
example
dziraf commented 2 years ago

Current implementation of datepicker doesn't really allow you to choose a date using the text input. The whole datepicker component will have to be rewritten probably. I'll move this issue to adminjs-design-system repository

LuckyLukas98 commented 2 years ago

I've recently created a PR (#18), which might also address this issue.

It's more or less a quick fix, as it doesn't rewrite the whole component, but it does increase the UX when using the DatePicker input to type a date.