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:00when 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).
Recent comments
Thanks Alejandro. That was the clues I needed.
Ubercart - Programmatically add product to cart and straight to Checkout
Have you tried uc_cart_add_item()? You need to provide the nid of the product. Then you can use backdrop_goto('cart/checkout'); to send the user to the checkout screen. uc_cart_add_item...
Ubercart - Programmatically add product to cart and straight to Checkout
No problem, let's see how it evolves. I'd be happy to provide a suggested version if i could. I will keep that in mind and try learn this hook chain hopefully very soon. I will...
File hashing uploads made through TinyMCE