Skip to Content
avatar image
Former Member

Clear Date component

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jan 07, 2015 at 06:42 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 07, 2015 at 04:18 AM

    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

    Add comment
    10|10000 characters needed characters exceeded