The CSS for the durations overlay seems to be using position:absolute, which means that the overlay appears in a fixed location tied to the bottom of the page. If the page is really tall, the overlay won't be visible until you scroll down.

Issue fork smart_date-3485112

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

gribnif created an issue. See original summary.

mandclu’s picture

What admin theme are you using?

mandclu’s picture

Category: Bug report » Support request
Status: Active » Postponed (maintainer needs more info)

I have tested this in both Gin and Claro, and it works as expected. Unless I get detailed steps to reproduce on a fresh install or Drupal, I don't have a path forward.

gribnif’s picture

1. Set up a test site using the evaluator guide: https://www.drupal.org/node/2997977
2. Install smart_date: composer require 'drupal/smart_date:^4.2@beta'
3. Create a new content type with a Smart Date Range.
4. Change the form display mode to Smart Date|Classic and move the date field to the top of the page. These are the options I used, to match my original site:
z

5. Add a new node using this content type. The default theme is Claro. This is what I see:
z

mandclu’s picture

Ah OK, so the issue is specific to the Classic widget. That shouldn't be an overly difficult fix.

TBH I have been thinking of deprecating the Classic widget. Can I ask why you decided to use that one?

mandclu’s picture

Title: New durations overlay not next to date field » New durations overlay not next to date field in Classic widget
Category: Support request » Bug report
Status: Postponed (maintainer needs more info) » Active
gribnif’s picture

TBH I have been thinking of deprecating the Classic widget. Can I ask why you decided to use that one?

I'm not entirely sure. I think it's simply because we've been using Smart Date since this was the only option. I just tried using Inline Range instead and, after some minor changes to the form_alter() hook we're using to set custom default values, I think it will work just fine--and it avoids the problem described above.

nicholass’s picture

We also ran into this bug, long time Smart Date users, and didn't even know new form display options existed. Seems like you could also fix the classic with a "position: relative" on the end date. We don't mind updating away from Classic, but probably lots of long term users of the module need notified to update their settings.

richarddavies’s picture

Same as previous comment, we're also long time Smart Date users who are having this issue with our Classic widgets (and were unaware there were newer options now.)

Ah OK, so the issue is specific to the Classic widget. That shouldn't be an overly difficult fix.

Can I ask why this 1+ year old issue hasn't been fixed yet if it's an easy fix? Presumably, you still support the Classic widget since it's still an option, right?

This seems to fix it for us, but there may be a better solution:

.smartdate--widget .time-end div.form-item:nth-child(2) {
	position: relative;
}

mandclu’s picture

Status: Active » Needs review

Thanks for the code suggestion! I rolled it into an MR. I would appreciate feedback from others who have experienced this issue

angel_devoeted’s picture

StatusFileSize
new11.95 KB
new12.17 KB

The fix works as expected, but the selector .smartdate--widget .time-end div.form-item:nth-child(2) has unnecessarily high specificity (0,4,1). Wouldn't a simpler selector like .smartdate--widget .time-end be enough and more maintainable?

smd-before
smd-after