cancel
Showing results for 
Search instead for 
Did you mean: 

Clear Date component

Former Member
0 Kudos

Hi There,

I am trying to clear Date component using code but I don't see any such function available in scripting.  Does anyone has any idea on this.  Basically I am trying to clear this date field with nothing in it once I click on clear button.

Thank you for your suggestions

Raj

Accepted Solutions (1)

Accepted Solutions (1)

Arjun_KT
Participant
0 Kudos

Hello Raj,

As mentioned above you can give DATEFIELD_1.setDate("");

or

DATEFIELD_1.setDate("ymd");

the idea is to give invalid date to make the calender component empty .

Regards

Arjun KT

Former Member
0 Kudos

Thank you Arjun...this works like a charm!!

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Raj,

In the On Click event of the Clear button, use the following script

DATEFIELD_1.setDate("");

When you pass an invalid date, the Date Field component is set to empty.

Hope this helps.

Regards,

Anuraag