I am developing an application where I have used the date picker where user can select future date and time and showing an error message if the date and time is not in future.
There is one clear button which sets the input field to empty. The clear button is working fine except one case when the validation error message is showing and I press the clear button, the date-time input does not clears first time but when I press it second time it clears the input.
I already tried the below solution but it is not working for me. I am also attaching the sample OML for issue.
Solution 1
Solution 2
Regards
Pankaj
Hi Pankaj,
To clear the input date, drag the client action DatePickerClearInputDate and set the InputId property to the Id of the input bound to the Date Picker, like the image below:
For more information, see OutSystems success documentation on the Date Picker.
Kind Regards,João
Hi João Marques,
Thanks for response.
I tried your suggestion but still facing same issue.
RegardsPankaj
It does work, you just have to tweak it like the DatePickerOnSelect like the OML in attachment.
In a way it is not completely fixed because the validation message is not displaying.
Hello Pankaj,
If I understand your question well then,
Please find the demo here:
https://personal-xyog61l7.outsystemscloud.com/DatePickerClean/test?_ts=637769739141316203
I have updated your oml.
Regards,
Ajit Kurane.
You can target its class or id by query selector , add this to your reset action in a javascript widget"document.querySelector('your element Class or ID').value = '';"
Hope this will work for you !
Thanks & Regard Tousif Khan
To clear the text box, use the OutsystemsUI datepicker client action and pass the datepicker block id to it.
NB: You must pass the id of the whole DatePicker / DatePickerRange block, not the id of the input box within the block.