DateTime List Item

What always stays empty? How are you trying to use it? Have you set it as the Default List Item Widget for a DateTime Item? Does your Item have a state that isn’t NULL or UNDEF? Where are you looking at the widget?

My testitem looks like:

The widget isnt shown in the default card for the room.

Did you look on the Properties tab of the room’s card? Since this isn’t a member of an Equipment, it’s a property directly on the Room and is shown on a separate tab. This is discussed in the Getting Started Tutorial: Pages - Overview Page | openHAB

Note that what you see on the Item’s page is the Stand Alone Widget, not the List Widget.

Nothing is shown in the property tab :/.
Furthermore if i open the timestamp card, which is created with this item, it only shows:

Do i need to install something?

Then there is something wrong with the model or with your Item. Perhaps you need to refresh the page. It’s not something that is related to this widget so opening a new thread is probably best.

NOTE: there is nothing at all special about this widget. It’s just a standard oh-input Item with the inputmode set to “datetime-local”.

On thing you can check is go back to the Default List Item Widget screen. Does it render there?

Edit: Wait, I had to remove a line from this earlier and may have removed one too many lines. It should work now. You’ll have to delete it and reinstall it.

After reinstalling the widget it now renders :). But for now the calendar button / calendar itself is missing. And i cant input anything
I’ll take a deeper look into it at the afternoon.

Hi Rich,

I can cofirm this problem, the item only shows an input box with the content mm/dd/yyy …, no calendar and no check icon is displayed.
Inputs in the box are seemingly not forwarded to the item. I set the default List Item Widget of the Item to rkl_datetime_list

grafik

I just posted a new version. I didn’t change anything except to use the displayState in the label if it’s defined.

All I can say is that it works for me (except I see that the check button no longer shows up) and there really isn’t anything else I can do about it. If I can’t reproduce the problem I don’t know what to fix.

Hi,

I installed both the stand alone and list item version of the DateTime widgets.
In the standalone version I can enter the date/time and validate with a click on the check button. (=OK)
As you wrote on the 20th of January, this can not be done in the list item version due to the missing check button.
Can I assist so you can reproduce the problem and fix it?

Kind regards,
Luc

Even if you can reproduce it, it’s not something I can fix. Ultimately, the problem is going to be in the browser or the F7 framework. I can’t fix those. All I can do is configure what’s made available to me.

The YAML at the top of the page is the complete set of code I have access to. The only part in the above that has anything to do with that date time picker is the line

type: datetime-local

That’s it. Everything else that happens after that is someone else’s code. If I understand how it works correctly, it’s not even openHAB’s code.

How can I use the list wiedget without the send button to get the value changed?

I think just hitting enter/return should do it. I don’t know for sure though as I’ve never not had the send button.

What platforms are you using? I can tell about app via android as well as Chrome on Windows 11. But do not show the send button on my systems.

On a Mac in Brave:

Safari on Mac:

Windows 11 in Brave:

Edge on Windows 11:

image

Chromebook in Google Chrome

Android in Android App:

Android in Brave:

just to be sure - we are talking about the list widget, not the standalone?

Windows 11, Chrome 105

Windows 11 Edge 105

=> maybe config on my side (and others?)?

Yes, the list widget. The same goes for the stand alone widget too though.

Maybe but I can’t imagine what it would be.

Happy to share my configs.

Widget code I am using:

uid: rlk_datetime_list
tags:
  - marketplace:127967
props:
  parameters:
    - description: Label for the widget
      label: Label
      name: label
      required: false
      type: TEXT
    - context: item
      description: An item to control
      label: Item
      name: item
      required: false
      type: TEXT
  parameterGroups: []
timestamp: Oct 5, 2022, 3:55:27 PM
component: oh-input-item
config:
  inputmode: text
  label: =props.label
  name: alarmtime
  outline: true
  sendButton: true
  subtitle: "=(items[props.item].displayState) ? items[props.item].displayState : items[props.item].state"
  title: =props.label
  type: datetime-local

Test page using the widget

config:
  label: Test
blocks:
  - component: oh-block
    config: {}
    slots:
      default:
        - component: oh-grid-row
          config: {}
          slots:
            default:
              - component: oh-grid-col
                config: {}
                slots:
                  default:
                    - component: oh-toggle-card
                      config:
                        item: testswitch
        - component: oh-grid-row
          config: {}
          slots:
            default:
              - component: oh-grid-col
                config: {}
                slots:
                  default:
                    - component: oh-list-card
                      config: {}
                      slots:
                        default:
                          - component: widget:rlk_datetime_list
                            config:
                              label: Endzeitpunkt
                              item: HomematicIP_Thermostat_Badezimmer_Profile_Override_EndDateTime
masonry: null
grid: []
canvas: []

Item description

DateTime                    HomematicIP_Thermostat_Badezimmer_Profile_Override_EndDateTime        "Profil Soll Ende [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"              <calendar>       (gBadezimmerThermostat)                                                                                                                              ["Point","None"]                 {stateDescription="" [pattern="%1$td.%1$tm.%1$tY %1$tH:%1$tM"]}

There’s nothing in the widget config that can change this. Frankly, the only reason that I published this as a widget to the marketplace was to make writing a tutorial easier. It’s a standard oh-input-item. All I did was set the type to datetime-local which is what causes it to render the date time picker. I also set the sendButton property to true.

That’s it. There’s nothing else.

This is a really lame custom widget. There’s nothing unique here. There’s nothing you couldn’t do yourself. All I did was set two of the documented oh-input-item properties so it shows the date time picker.

There might be something that can be done by OH (please file an issue on the openhab-webuis repo) but from what I saw, what actually renders that date time picker is not MainUI, it’s not even F7. As far as I can tell, it’s the web browser itself. So if it doesn’t work I’m not sure there’s much OH can do about it. There certainly isn’t anything I can do about it from the widget.

Any idea / workaround how I could enter a datetime? I have a lot of thermostats where I want to use a datetime with proper picker. Having a standalone widget would be somehow problematic.
Any workaround idea? Via popup using the standalone widget does not work as well (yet).

I doubt it. I suppose you could try to implement a whole new widget from scratch, if that’s even possible. But whether you put it in a pop-up or anything else, as long as you are using an oh-input-item what you see is what you get.