Pylons / deform

A Python HTML form library.
Other
416 stars 160 forks source link

Sequence of Date Inputs triggers additional date browser on submit #484

Open frispete opened 3 years ago

frispete commented 3 years ago

The sequence of date inputs show a couple of sub optimal behaviors:

grafik

This happens with both Firefox 80 and chromium 85 on a local install as well as with the official demo site.

A similar behavior appears with time inputs as well.

stevepiercy commented 3 years ago

The submitted value is an empty list, which is not the same as None, which is why it passes validation. That might be unexpected, but it makes sense once you understand. I would accept a PR that validates for a non-empty list, with tests.

We changed the default behavior to focus on the first input in a form. That's why a datepicker pops up on every load. This can be overridden. I'd accept a PR for the date, datetime, and time inputs to not pop up the datepicker on page load, but only on click.

This is a demo only. We do not change styles from those provided by third party JavaScript plugins. Styles are left to the developer to modify as they see fit. FYI, we are looking at another datepicker for Deform 3.0 that has better usability.