Questions and discussion about using ProcessMaker 2: user interface, running cases and functionality
Forum rules: Please search to see if a question has already been asked before posting. Please don't ask the same question in multiple forums.
#785170
Good morning,


Is there anyone who could help me with this?

I want to click a button in the dynaform, and then the date field is reset to null.
Untitled.png
Untitled.png (2.5 KiB) Viewed 4169 times
So how should I write js code ? I have tried $("#date1").setValue(""); however it doesn't work. :shock:

Many thanks,
Yuan
By cosyxu
#785181
Hi Marceloramirez,

Thank you for your kind reply,

Yes I know the clear button, however, I want to disable this date control, so the user cannot change the date.

What I would like to do is :

1. After user click the checkbox as "checked", then this date control will show the current date. I have done these successfully.

2. When the user uncheck the checkbox, I want the date field to be null. So I tried to add js code, but it doesn't work, would you please help me with this "clear date" function code? I have tried $("#date1").setValue(""); but it doesn't work. :(

Cheers,
Yuan
By cosyxu
#785182
Hello,

Actually, I have found the solution from another thread, anyway thanks for your help. :)

This is the code from another thread ,and it works perfect.

$("#form\\[date1\\]")[0].value = '';

Cheers,
Yuan

If you're seeking to maximize gains and minimize r[…]

Embark on your virtual journey with Dappsfirm! Our[…]

Unleash your creativity with us! Dive into the wor[…]

Most entrepreneurs would pick the crypto exchange […]