Active
Project:
Smart Date
Version:
4.2.x-dev
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
28 Jan 2022 at 11:21 UTC
Updated:
24 Feb 2026 at 16:01 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mandclu commentedThis is a configuration option in the widget settings. Here's a screen shot:

Comment #3
joewhitsitt@mandclu, we are noticing a regression as we update from 3.4.2 to 3.5.1
We have a data range with time field where we have 0 as the only duration option. Though we have this form option set, it is only hiding the input, not the label.
Before the label was getting an inline style
display: none;I was able to reproduce this on simpletestme using the smart date starter kit (smart_date was not an option) which grabs smart_date 3.5.1
Comment #4
joewhitsittMight actually be related to https://www.drupal.org/project/smart_date/issues/3187574
This is a regression from https://www.drupal.org/project/smart_date/issues/3208136
Comment #5
mandclu commentedNot sure if it's related, but please check out the patch posted to #3269460: JS Error - Allowed duration increments - key = 0 to see if it has any impact on the issue reported here
Comment #6
joewhitsitt@mandclu
I just tested that #6 patch and it doesn't hide the datetime-wrapper.html.twig label. Looks like https://git.drupalcode.org/project/smart_date/-/commit/78ad8bb had to be very specific to overcome the core template. Looks like core is looking to re-write it to be easier to work with: https://www.drupal.org/project/drupal/issues/3078334
I didn't mean to hijack this issue and can open a separate issue if needed.
Comment #7
mandclu commentedIt's somewhat of a hijack, but related enough that we may as well keep going, and maybe it will inform an answer for the original post.
@joewhitsitt when I try to follow the steps you describe using SimplyTest.me, here's what I see:
That seems like what you're looking for, no?
Comment #8
joewhitsittLooks like there is a difference between "Smart Date and time range" and "Smart Date inline range." This appears to work for inline range which is why I missed it when testing as we are using the "time range" version.
Comment #9
mandclu commentedOK, with that extra piece of information, I can now reproduce what you're seeing.

Is there a reason for using the older widget in this case? Especially if zero duration is the only allowed value, it doesn't seem as though the labels are adding any value.
I should still probably fix it, but I would guess that this is only an issue in the Seven theme, which is basically deprecated at this point.
Comment #10
joewhitsittI am a bit fuzzy on the original work, but maybe this was the solution at the time and we didn't read through newer release notes and switch off of it. We can evaluate the other widget soon and see if it works for our use-case.
We first noticed this in Claro and reproduced it in Seven because we wanted to make sure it wasn't a claro thing.
Comment #11
pyrello commentedComment #12
damienmckenna