Home > Forum > Forms > Time only picker in WebCon item list

Time only picker in WebCon item list
0

Hi Everyone,

I’ve just started implementing business processes in WebCon BPS and couldn’t find the answer to my question on the forum.

Business case:
It’s an overtime management process.
In one attribute, the user provides the overtime date, and then in the item list they provide additional data, including the employee’s name, start time (hours and minutes), and end time.

I would like to give the user an easy way to set the time. I could use a Date/Time column, set provided date and ask the user to pick a time, but the standard date/time picker isn’t ergonomic in this situation.

Is there any way to use a “time only” picker in an item list column, or to open the date/time picker directly in the "time part"?

Alternatively, I could use a text attribute with regex validation, or choice lists (one for hours and one for minutes), but neither feels elegant.

How would you approach this situation? Any advice would be appreciated.

Hello Marcin,

This solution is a bit out there and needs some more "fine-tuning" but you could use a javascript form rule and put it on the Main form - behavior of the step where the overtime data is beeing entered.

The javascript checks if the time element which switches to the time view is present and if it is then the element is clicked. Which happens fast enough that it looks like it's been opened automatically:

const timeSelectionObserver = new MutationObserver((list, obs) => {

let dialog = document.querySelector('td.rdtTimeToggle')

if (dialog) {

dialog.click()

}

})

timeSelectionObserver.observe(document.body,{childList: true, subtree: true})


Hope it helps.

MVP

Hi Marcin,
in my case i've always ended up with date/time pickers where users pick date+time. I'm not a fan of this control either, but never developed an alternative.

Right now, i'm thinking that it would be doable with and SDK, but from more native solutions you could go with:
* regex as you already proposed
* html field, where you will create your control, and add some javascript that will set some webcon attribute value
* External controls - this allows you to create a website on another server with the control only, and using javascript you'll have set some attribute value like in html field https://docs.webcon.com/docs/2025R2/Studio/SDK/PluginTypes#external-controls