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.

Comments

Steven Buteneers created an issue. See original summary.

jeroendegloire’s picture

StatusFileSize
new596 bytes
eduardo morales alberti’s picture

Status: Active » Needs review
StatusFileSize
new3.66 KB

Thank 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.

BarisW’s picture

Tried both patches, but neither works. In both cases, the time fields aren't hidden nor stored upon saving.

BarisW’s picture

StatusFileSize
new552 bytes

This should work.

  • akalam committed aad1c1f on 8.x-1.x authored by BarisW
    Issue #3091709 by BarisW, jeroendegloire, Eduardo Morales Alberti,...
akalam’s picture

Status: Needs review » Fixed

#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!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.