Hi,
Is there a way to clear the date from the Date picker widget once a date has been selected?
I am avoiding writing code to clear the date if the widget does have that option ?
Backspace does not work neither does the Delete button button on the keyboard work
In OutSystems, the Date Picker widget doesn't natively include an option to clear the selected date using the Backspace or Delete keys. However, you can achieve this functionality by adding a clear button next to the Date Picker that clears the selected date.
Steps to Add a Clear Button to the Date Picker:
Add a Date Picker and a Button:
Set Up the Button to Clear the Date:
Example Implementation:
Add a Date Picker:
Add a Clear Button:
Create a Client Action:
Assign the Client Action to the Button:
Yeah , this is my last resort
Hi Randall Jodache Chetty,
If you are used to setting the variable value to NullDate(), there is a chance to show the NullDate() value in your date picker, like you were selected as "01-01-1900".
To avoid this issue, you can simply call the client action, which is called "DatePickerClear" provided by outsystems. It will reset the selected dates (if any) and clear the input of a DatePicker with a given identifier.
Thanks , I will check the clear date picker action out but I definitely do not want "01-01-1900 " to show , I rather want it empty
Then you should go with the "DatePickerClear" action to make it empty
I'm avoiding writing code - but looks like I have to now
Date Picker clear is an inbuilt client action which is provided by outsystems,
Let me know if this issue is fixed
Lets hope Outsystems implements this soon
An alternative, which was sufficient for me that the content of the field can be deleted with Remove or Backspace, is to use the action “DatePickerSetEditableInput” in the DatePickerInitialized handler.
1- Add "DatePickerSetEditableInput " from OutsystemsUI.
2- Create a screen action with a DatepickerId Input parameter, inside this action add the DatePickerSetEditableInput action and set input to datepickerId.
3- In the initialized event of the DatePicker widget, set the handler your screen action and set the input parameter to DatepickerId.
Hello gentlemen,
The solution to this problem is to simply use a Client Action "DatePickerClear" that the 'OutSystemsUI' dependency provides.