I installed with composer and Enabled the Hide seconds radio button then updated and saved.
But seconds are still visible while adding article.
Using PHP 8.1 latest Drupal (10.0.4)

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

biarr created an issue. See original summary.

geek-merlin’s picture

Thanks for reporting this. Did you look for existing issues? DOes the patch in the related issue fix that?

biarr’s picture

Dear geek-merlin, thank you for your prompt reply. I applied the mentioned patch but it didn't solve the problem.

geek-merlin’s picture

Version: 8.x-1.3 » 8.x-1.x-dev
Status: Postponed (maintainer needs more info) » Active

OK so likely the upstream render array ran away and this needs debugging.

omkar-pd’s picture

Installed the module on Drupal 10. Was able to reproduce the issue. It seems that value $element['#datetimehideseconds']['hide'] Is getting Null even if the hide seconds field is checked in the widget. So the code inside if (!empty($element['#datetimehideseconds']['hide'])) is not excuted.

omkar-pd’s picture

After some RnD. I found out that hook_field_widget_form_alter is removed in Drupal 10. Check out the below link for change records.

https://www.drupal.org/node/3180429

omkar-pd’s picture

Status: Active » Needs review
geek-merlin’s picture

This looks convincing! Does it fix the issue for you?
If you add a MR, it will be committed sooner ;-).

omkar-pd’s picture

Yes @geek-merlin, it fixes the issue for me. Raised an MR.

  • geek-merlin committed e0c08ef5 on 8.x-1.x authored by omkar-pd
    Issue #3347617 by omkar-pd, biarr, geek-merlin: Doesn't hide seconds on...
geek-merlin’s picture

Category: Support request » Bug report
Status: Needs review » Fixed
Related issues: +#3348226: Write a proper test

OK committed this. Thanks a lot!

We really need a test so this won't break again. So if you know someone... ;-)

Status: Fixed » Closed (fixed)

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

leducdubleuet’s picture

I know this has been committed already on dev for a while but we would need a new release please for Drupal 10 now that Drupal 9 is EOL.

Thank you!