28
Views
3
Comments
Solved
[OutSystems UI] Clear Date Picker
outsystems-ui
Reactive icon
Forge asset by OutSystems

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! 

2026-01-28 16-57-48
Mihai Melencu
Champion
Solution

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.


DatePickerSample2.oml
2025-12-09 14-11-18
Janakiraman JR

Hi Vanessa,

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.

2026-01-28 16-57-48
Mihai Melencu
Champion
Solution

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.


DatePickerSample2.oml
2025-03-26 11-12-02
Vanessa Marques

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 ;) 

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