9
Views
7
Comments
Solved
Time Input Mobile
Question

Hi!

Can someone help me with this problem in time type input? I set the time and then when I return to the page I lose seconds, any idea what it might be? (note that the local variable in the debug has the seconds) 



Regards!

mvp_badge
MVP
Rank: #72
Solution

Hi Diana,

Sorry!, I'm not able to figure out the causing issue/bug for the reported case, but I do have a workaround to share.

Steps to follow:

  • Set the Time input widget, Input Type property to Text
  • Map the Time input widget, Variable property with a client/local variable of Text data type instead of Time Data type.
  • Set the input widget attributes with type attribute as time and step attribute value to 2

See this sample app


Hope this helps you!


Kind regards,

Benjith Sam

Rank: #401

Hi Benjith, 


Solved my problem!


Thank you so much!

mvp_badge
MVP
Rank: #72

You're most welcome, Diana.

Glad to help you :)

I also want to thank you for sharing the learning which you had in your last post i.e. we can set the Time type input widget with step attribute/property value to 2 i.e. step = 2 to enable the second's selection list in the time picker. It was new learning for me as well :)


Kind regards,

Benjith Sam 

Rank: #401

Hi Benjith,


Unfortunately it doesn't work properly on android, because it doesn't show the seconds, do you know the reason?


Thank you!

Rank: #56

Hi Diana,


After a little digging, DatePicker widget from OutSystemsUI, only sets up hours and minutes when ShowTime variable is set to True.



Cloning the picker and doing the fix, it solves your issue.

Check the OML in attachment with the fix.



Hope it helps.


Regards,
João

ExampleDatePickerWithSeconds.oml

Rank: #401

Hi João, 


I am not using the DatePicker widget.

Rank: #56

Sorry, I misunderstood.

Indeed the value which is rendered in the HTML loses the seconds value.

 


The assign would have to be made in a different way to workaround the value which is inserted in the HTML or with a javascript to force the time value with seconds to be there.

mvp_badge
MVP
Rank: #72
Solution

Hi Diana,

Sorry!, I'm not able to figure out the causing issue/bug for the reported case, but I do have a workaround to share.

Steps to follow:

  • Set the Time input widget, Input Type property to Text
  • Map the Time input widget, Variable property with a client/local variable of Text data type instead of Time Data type.
  • Set the input widget attributes with type attribute as time and step attribute value to 2

See this sample app


Hope this helps you!


Kind regards,

Benjith Sam

Rank: #401

Hi Benjith, 


Solved my problem!


Thank you so much!

mvp_badge
MVP
Rank: #72

You're most welcome, Diana.

Glad to help you :)

I also want to thank you for sharing the learning which you had in your last post i.e. we can set the Time type input widget with step attribute/property value to 2 i.e. step = 2 to enable the second's selection list in the time picker. It was new learning for me as well :)


Kind regards,

Benjith Sam 

Rank: #401

Hi Benjith,


Unfortunately it doesn't work properly on android, because it doesn't show the seconds, do you know the reason?


Thank you!