Custom widget properties: Color picker?

For HabPanel, properties of custom widgets can have various types like String, Number, Checkbox, Item, Color.
For OH3 custom widgets, according to Configuration Descriptions | openHAB, context can also be “color” or “date” but I do not get a color or date picker then.
How can I define a property that gives the user of the widget a color picker?


The doc you have linked is not referencing the custom widget property options, but the options developers can include for the configuration of bindings. These are separate things.

As far as I know there is no help doc at the moment that lists the available contexts for widget properties, but you can see the list here in the definition for properties popup dialog. There is no listing for color that brings up a color picker. I don’t know if there was a technical difficulty which means this wasn’t included (there are a lot of different ways to define color and not every color property in widgets works with every color definition) or if this was just assumed to not be a common enough need to be worth developing.

You can see from that list that there are separate time and dayOfWeek contexts that may satisfy your datepicker requirements. Also access to the cron expression builder via the cronexpression context if that’s closer to what you were thinking.

1 Like

Thanks for the explanation. At the moment, I would just like to have a color picker, but I can enter the color code manually for now into a TEXT prop.