Page 1 of 1

Input mask for textboxes over time data

Posted: Fri Jun 22, 2018 2:44 pm
by MLeege
We're currently running Profound UI version 5.13.0. I'm updating to the latest version on Sunday.

I've got an screen I need the user to type times into. Ideally I'd be able to use a time formatted field and have a mask which enforces an input like "HH.MM.SS" (or H.i.s) , where the periods are immutable. I am currently considering making it a dropdown because I can't find any other way to do this. Is there a way to accomplish this, short of the dropdown? I guess I could also split it up into three fields and do validation at run time but that seems more awkward than the dropdown.

Thanks.

Re: Input mask for textboxes over time data

Posted: Fri Jun 22, 2018 3:11 pm
by Scott Klement
Is this for mobile, or for running on a PC? The reason I ask is that mobile devices often have a nice time-picker available.

If there are a small number of values, then a dropdown would make sense. If you plan to allow every single possible time, I don't think a dropdown would work well. (If you allow every possible value for hours, minutes and seconds, thats 86400 values to choose from in your dropdown.) A better choice in that case would be 3 different dropdowns, one for hours, one for minutes, one for seconds.

Another good way to do it on PC is to use 3 spinner widgets. Use the client-side validation properties to restrict them to the allowed values. (That does not work well on mobile, however.)

Re: Input mask for textboxes over time data

Posted: Fri Jun 22, 2018 3:15 pm
by MLeege
Hey Scott,

Exclusively PC, for now. Spinner widgets are a way less silly way to do it and that's what I'm going with.

Thanks.