Hello,
I have an input of datatype Time, however it only allows editing hours and minutes. How can I edit hours, minutes and seconds? Thank you!
Hello
You just have to add step =1 to your input attribute
I am attaching a sample for you with the use case
https://personal-ejuytnht.outsystemscloud.com/SampleForumPOCS/TimePicker?_ts=638153115224041328
Best Regards
Tousif Khan
Thank you. However, this is not working quite well.
I have a table with a DateTime in one column, e.g. 10:32:16, that comes from DB.
Next to it, I want an input to edit this DateTime value. I added step 1 in the input, but now it shows 10:32:00 in the input instead of 10:32:16. The seconds seem to always show up as 00...
May I know what is the data type of your date time col linked attribute?
Sure, the datatype of the attribute is DateTime.
Cute Bear,
please share a sample OML with what exactly you are doing. Are you sure you don't have some FormatDateTime somewhere messing things up for you ?
Sure, there it is.
In the mainscreen:
In the edit screen:
Aaah,
Ok, I see. So it is possible to enter seconds, they are also correctly saved to database and retrieved from database, but when using that existing value in an input widget, the seconds get lost.
I think this is a bug in Outsystems core javascript code, they just don't cater for the seconds part of a datatime in an input.
Possible workaround is to set the value yourself with javascript after retrieving it from the database. The value is correctly coming back from the aggregate, and shows correctly if you would put on your screen in an expression, it is just the part that initializes an initial value for the input that goes wrong.
See attached your demo altered to show that if you amend it yourself, you can get the correct value into the input.
None of this is very nice,and you should definitely test thouroughly if you are going this route.
Dorine
Hello Dorine,
Thank you very much for your help, this works!Also, do you know if there any way that this could be reported to OutSystems?
reporting : i think just enter a support ticket :
https://success.outsystems.com/support/home/
Hi @Cute Bear
As @Tousif Khan said you can just add step="1" in the attribute then it'll show Seconds as well.s -
additionally for more operations or attributes on input type time you can refer this tutorial -
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/time
Thanks
Deep