Compatibility with datetimehideseconds

Created on 22 January 2021, almost 4 years ago
Updated 3 April 2024, 9 months ago

Problem/Motivation

This module is looking good, but I was hoping to use it in concert with ...
https://www.drupal.org/project/datetimehideseconds β†’

If I try to use the two together, the javascript doesn't function correcting and the form will not submit.

In the console, there is an error ...

An invalid form control with name='my_date_range[0][end_value][time]' is not focusable.

Not sure if this is an issue to be resolved in datetimehideseconds or this module, but I started here.

Steps to reproduce

Enable datetimehideseconds and configure the field widget to both hide seconds and use date all day.

Proposed resolution

TBD

Remaining tasks

TBD

User interface changes

TBD

API changes

TBD

Data model changes

TBD

✨ Feature request
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States matt_paz

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡¦Ukraine vlad.dancer Kyiv

    Here is a patch that foes next things:

    • for field widget: adds js setting to hide seconds when datetimehideseconds is enabled and configured to hide specific field.
    • for field formatter: add new condition to check 23:59:00 time and assume it as valid "all-day" time format.
  • πŸ‡ΊπŸ‡¦Ukraine vlad.dancer Kyiv

    This patch incorporates previous changes plus makes compatible with Drupal 10 version of datetimehideseconds module πŸ› Doesn't hide seconds on Drupal 10 Fixed (in dev branch).
    There are few more minor adjustments:
    date_all_day.js:

    • used core/once library to attach drupal behaviour once,
    • added workaround to prevent browser of running time input validation when seconds are not hidden.

    Patches' interdiff is in place.

Production build 0.71.5 2024