duetds / date-picker

Duet Date Picker is an open source version of Duet Design System’s accessible date picker. Try live example at https://duetds.github.io/date-picker/
https://www.duetds.com
MIT License
1.73k stars 68 forks source link

Being able to manually insert a date in the date field. #103

Open paaljoachim opened 2 years ago

paaljoachim commented 2 years ago

Describe the bug Manually clicking into the date field by adding a date the date will not be read.

Here is an issue at the My Calendar WordPress plugin repo which uses the date picker: https://github.com/joedolson/my-calendar/issues/438

Expected behavior I expected that one would be able to manually add a date by clicking into the date field and writing a date YYYY.MM.DD or YYYY-MM-DD. It seems the date becomes active only on clicking the date picker button and selecting a date.

Screenshots

Manually adding a date. It says Daily - 500 times because the date is not being read (looks like it can not be read). Screenshot 2022-02-12 at 14 51 08

Clicking the date picker and selecting a date. The date is read. Screenshot 2022-02-12 at 14 51 24

It would be great to get this fixed. Thank you!

WickyNilliams commented 2 years ago

The date picker needs to be configured to accept different date formats. It only works with ISO format out of the box. If the entered date is valid, a change event is fired, then you can update the UI. See the example "Getting selected value" in the docs https://duetds.github.io/date-picker/

Doesn't seem like a bug this end