I am using DatePickerSetEditableInput in OutSystems Reactive.When I try to clear the Date Picker value , the date gets cleared for a moment but automatically resets to the previously selected date.How can I clear the Date Picker value permanently when using DatePickerSetEditableInput? without any button
Hi Danna,
Have you tried using DatePickerClear ? Also would be helpful to have a sample OML to see how you handle the logic.
Hi @Danna Martinez ,
When you use DatePickerSetEditableInput, clearing the date manually doesn’t stay because the Date Picker resets to the old value if the change isn’t a valid date. To make the date clear permanently, use the OnInput event instead of only OnChange. In the OnInput action, check if the new value is a valid date—if yes, save it, and if the user clears the field, set the variable to NullDate(). This way, the variable updates immediately, and the Date Picker doesn’t restore the previous date, allowing the cleared value to stay without needing any button.
Thanks and Regards,
Karan Shinde
Hi @Danna Martinez,
Adding to Mihai’s response, you can use the DatePickerClear, it just requires using the DatePicker block, which can also be found in OutSystems UI.
Hi @Danna Martinez
Using the DatePickerClear action from OutSystemsUI will correctly clear the Date Picker value and prevent it from resetting.
Peter Hieu
Hi Danna ,
When using DatePickerSetEditableInput in OutSystems Reactive, clearing the Date Picker manually (by deleting the text) does not persist because the Date Picker widget automatically restores the previous value if the bound variable is not updated.
To clear the value permanently, you must:
Update the Date Picker’s bound variable to NullDate() during the OnChange event of the editable input.
Without updating the variable, OutSystems will assume the previous value is still valid and repopulate it.
--- Why This Happens (Technical Explanation)
DatePickerSetEditableInput makes the input editable, but:
The user manually erases the date text
The Date Picker still holds the old value in the bound variable
On re-render, OutSystems repopulates the last valid date
So unless you explicitly set the variable to NullDate(), the field will never clear.
Correct Solution (No Button Required)
1. Bind the Date Picker to a local variable
Example: SelectedDate (Data Type: Date)
2 . Add an OnChange Event to the Input field
Inside the OnChange action:
IF( IsDateTime(TextInputValue) = False, SelectedDate = NullDate(), SelectedDate = TextInputValue)
Or the simplest version:
SelectedDate = NullDate()
3️. Refresh the DatePicker after updating the variable
Use Ajax Refresh on the DatePicker widget or its container.
This ensures the UI shows the cleared date.