hass-browser_mod: Datetime selector not working in popup

My Home Assistant version: 2023.11.2

A popup containing a datetime selector is not usable.

Expected result: a second popup on clicking the date selector, allowing a date to be chosen.

Actual result: no popup, rendering the datetime selector inoperative.

To reproduce:

    service: browser_mod.popup
    data:
      title: Test
      content:
        - name: date
          label: 'Date:'
          selector:
            datetime: null

Other selectors are fine, this problem affects only date and datetime. This is a duplicate of #593 but that issue was closed as stale, and the problem persists.

By replacing the space in the checkboxes ([ ]) with an X below, I indicate that I:

  • Understand that this is a channel for reporting bugs, not a support forum (https://community.home-assistant.io/).

  • Have made sure I am using the latest version of the plugin.

  • Have followed the troubleshooting steps of the “Common Problems” section of https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins.

  • Understand that leaving one or more boxes unticked or failure to follow the template above may increase the time required to handle my bug-report, or cause it to be closed without further action.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15

Most upvoted comments

@dcapslock It looks like it has fixed it for us, albeit I’m struggling to fix the styling with card_mod as the date/time selector is not showing on top of my form. I’ve tried various options of changing the z-index but not having any luck. Based on my example above, do you have suggestions on where/how to apply the additional styling?

You don’t need card_mod for styling popups. Styling can be done directly. For testing your case, what worked for me is below:

...
  tap_action:
    action: fire-dom-event
    browser_mod:
      service: browser_mod.sequence
      data:
        sequence:
          - service: script.reset_event_times
          - service: browser_mod.popup
            data:
              dismissable: true
              autoclose: false
              title: Create event
              style: |-             # <- added
                z-index: 5;         # <-
                position: absolute;  # <-
              content:
...

Thanks! That’s worked a treat!

@dcapslock It looks like it has fixed it for us, albeit I’m struggling to fix the styling with card_mod as the date/time selector is not showing on top of my form. I’ve tried various options of changing the z-index but not having any luck. Based on my example above, do you have suggestions on where/how to apply the additional styling?

You don’t need card_mod for styling popups. Styling can be done directly. For testing your case, what worked for me is below:

...
  tap_action:
    action: fire-dom-event
    browser_mod:
      service: browser_mod.sequence
      data:
        sequence:
          - service: script.reset_event_times
          - service: browser_mod.popup
            data:
              dismissable: true
              autoclose: false
              title: Create event
              style: |-             # <- added
                z-index: 5;         # <-
                position: absolute;  # <-
              content:
...

See PR #821 which fixes this issue. You will need to adjust styling of the popup to make sure the selector dialog is on top. See note in amended Popups documentation.