156
Views
5
Comments
Solved
How to set input to empty using DatePicker on Reactive web?

Hi there!

On DatePicker properties I have already set Start Empty to True. When I refresh my browser the input is empty, that's right!

On this screen, I have a few filters and also a reset functionality to clean them.

In my assign, I have set my variables to NullDate, but when I click on reset I see the null value (01-01-1900) and not empty.

I have tried a few things but I didn't figure out how to show "empty" after resetting.



Rank: #612
Solution

Hello Tamirys


See the oml how I implemented it.


First you need to assign the Text variable (Date in my case) to the Input. In the OnSelect action you convert date time from StartDate to text and assign it to the Date text variable. On the resetting Link you clean that text variable Date = "". Also place StartEmpty of the date picker to Date = "". It works just fine.

Best regards 

Ania


DatePickerClean.oml

mvp_badge
MVP
Rank: #96

Hi Tamirys Barina,

If nothing works you can use JavaScript to reset the Date input value as mentioned below:


JS Code Snippet

document.getElementById($parameters.ElementId).value = '';

Check this:  Demo App Screen


Hope this helps!


Regards,

Benjith Sam

Rank: #612
Solution

Hello Tamirys


See the oml how I implemented it.


First you need to assign the Text variable (Date in my case) to the Input. In the OnSelect action you convert date time from StartDate to text and assign it to the Date text variable. On the resetting Link you clean that text variable Date = "". Also place StartEmpty of the date picker to Date = "". It works just fine.

Best regards 

Ania


DatePickerClean.oml