Input widget with Date format - Reset doesn't work with partial input
Application Type
Reactive

Hi All,

I have an input widget with format set to date. It works fine and I have a reset button associated with it. Reset also works fine, if a date is picked on the date picker or if the user enters the complete date.

But, reset doesn't work if the user an incomplete date (e.g., just the month part as in the below screenshot, or just mm/dd part, etc.,). I see that the field detects the data entered only after completely entering all parts of the date (OnChange event doesn't get triggered if I enter just the mm part).

My OnReset, just sets the NullDate() to the date variable and it works fine for valid dates. 

Is there any way to make this work? (Unfortunately, I wont be able to use the input widget with format set to text and associate a date picker to that)


Thanks,

Kat

Solution

Hi Katsiv,

It can be achieved via JS.

Please refer the below link and OML for your problem's solution.

https://saravanan-gamechanger.outsystemscloud.com/TEST/Date_RESET?_ts=637558247284313219

Thanks,

Saravanan Santhanam.

TEST.oml

This is just perfect, thanks Saravanan.

Hi KatSiv,

I tried to solve your issue but probably i can think of  workaround by disabling manual input from user. It will force user to enter date via datepicker only.

See following solution and try if it works.

https://www.outsystems.com/forums/discussion/36412/manual-date-entry/

Thanks,

Vani



Thanks Vani for the suggestion. We would still need to provide the user the ability to enter the date manually :(

Solution

Hi Katsiv,

It can be achieved via JS.

Please refer the below link and OML for your problem's solution.

https://saravanan-gamechanger.outsystemscloud.com/TEST/Date_RESET?_ts=637558247284313219

Thanks,

Saravanan Santhanam.

TEST.oml

This is just perfect, thanks Saravanan.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.