deform icon indicating copy to clipboard operation
deform copied to clipboard

Sequence of Date Inputs triggers additional date browser on submit

Open frispete opened this issue 3 years ago • 1 comments

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

  • An empty sequence is accepted, although the form shows Dates as required
  • After adding a date and pushing Submit, another date browser widget is shown
  • the date browser widget is rendered much bigger than the rest of the page (font wise) and contains some glitches (the selected year and month texts are not fully drawn)

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.

frispete avatar Oct 01 '20 11:10 frispete

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.

stevepiercy avatar Oct 01 '20 12:10 stevepiercy