Hi everyone!!
I'm having an issue clearing the Date Picker when I click the clear button. The variable is set to null, but visually the date still appears in the input field. Has anyone managed to solve this? I've already tried DatePickerClear, and also tried JavaScript, but nothing works.
Thank youuu!
Hi Vanessa,
The DatePickerClear should work. Please verify the widget ID you're passing to the client action, you may have used the input's ID instead of the Date Picker's ID. To ensure the Date Picker has a valid ID, make sure to set its Name property.
I attached a sample OML please check it.
This is a common issue with the OutSystems Date Picker widget, when you try to clear the date programmatically, setting the variable to NullDate() doesn't always update the input field visually.
To work around this, on your "Clear" button:
Set the date variable to NullDate().
Then toggle a flag variable: set ShowDatePicker to False, and immediately back to True.
This forces the widget to re-render and clears the input properly.
If you're still running into limitations with the built-in Date Picker, you choose to use a regular text input with custom validation and a JavaScript-based picker like Flatpickr. However, this approach is more complex and usually not necessary for most use cases.
Hi :)
Thank youuu!!! The DatePickerClear wasn't working because I was passing the input's ID instead of the Date Picker's ID!!
Thank you both so much for the help ;)