Problem
When using the formatter for all day on fields with a cardinality bigger than one (1), the formatter breaks in two ways:
- When selecting the "All day" checkbox, time selection is hidden for all instances of the field, instead of just the instance where the checkbox is selected.
- When selecting the "All day" checkbox the time for all instances is set to 00:00:00 - 23:59:59. This breaks the default "empty" instance of a multiple value field.
Screenshots:


Proposed resolution
Take multi value fields into account. Only manage the instance where the "All day" checkbox is actually checked instead of all instances.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3091709-5-date-all-day-allow-multiple.patch | 552 bytes | BarisW |
| #3 | date_all_day-date_range_multiple-3091709-3-8.x.patch | 3.66 KB | eduardo morales alberti |
Comments
Comment #2
jeroendegloire commentedComment #3
eduardo morales albertiThank you @jeroendegloire, we fixed the issue adapting the code, before committing it in the module, it must to be revised by more drupal contributors.
We attach the patch.
Comment #4
BarisW commentedTried both patches, but neither works. In both cases, the time fields aren't hidden nor stored upon saving.
Comment #5
BarisW commentedThis should work.
Comment #7
akalam commented#5 works as expected on SEVEN and seems to be the simplest solution. I would create a separated issue for supporting claro and make the js more theme agnostic.
Thank you guys!