Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "All day" functionality for the HTML5 widget #6142

Open
olafgrabienski opened this issue Jun 12, 2023 · 0 comments
Open

Add "All day" functionality for the HTML5 widget #6142

olafgrabienski opened this issue Jun 12, 2023 · 0 comments

Comments

@olafgrabienski
Copy link

olafgrabienski commented Jun 12, 2023

Description of the need

Every now and then I need the "All day" functionality for a date field which is also able to collect hours and minutes. So far, I used to use the contrib module Date All Day, but the module doesn't work with Backdrop's relatively new HTML5 widget.

Proposed solution

Backdrop core should support the "All day" functionality, at least for the HTML5 widget.

Alternatives that have been considered

Fix the Date All Day module. I think however, a solution in core is better. Not only because the contrib module isn't really maintained anymore, and I don't have the skills to provide a PR for it, but because things have changed with the introduction of the HTML5 widget.

Looking back some years: the "All day" part was omitted when the Date field was added to core. However, things have changed in the meantime:

  • The Date All Day contrib module doesn't work with the HTML5 widget.
  • Sooner or later, the HTML5 widget will replace the jQuery datepicker, and/or the latter will be deprecated.
  • The HTML5 widget works much more straightforward than the jQuery datepicker. With the jQuery picker, you have to select a "preferred format for inputting dates", which makes it difficult to fill in only a date when the field is configured to collect also hours and minutes. In contrast, the HTML5 widget allows to just set a date in that situation.
  • With the HTML5 widget, if you set only the date on a field which is able to collect also hours and minutes, Backdrop sets the time to 00:00 (or a time zone related equivalent, e.g. 02:00 when your time zone is 2 hours after UTC) and shows this time after saving content. While this is technically comprehensible, it's confusing for editors.

Draft of feature description for Press Release (1 paragraph at most)

Backdrop now includes an easy to use option for "All day" dates (when using the HTML5 widget).

@olafgrabienski olafgrabienski changed the title Consider to add "All day" functionality Add "All day" functionality Jun 12, 2023
@olafgrabienski olafgrabienski changed the title Add "All day" functionality Add "All day" functionality for the HTML5 widget Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant