Skip to Content
author's profile photo Former Member
Former Member

Want to clear date

Hi,

I want to clear date varible ........Declare date as string it gives error ....

Please put code for that if possible.

Regards,

Gurprit Bhatia

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 21, 2007 at 09:37 AM

    Hi

    I think you want to displya your date field blank, for that you can set your date element as null, but in further use be carefull about null pointer checking.

    IYourNodeElement node=wdContext.createYourNodeElement();

    node.setYourDate(null);

    wdContext.nodeYourNode().addElement(node);

    Regards

    Abhijith YS

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 21, 2007 at 09:41 AM

    Hi,

    To Set date

    wdContext.currentContextElement().setDt(new Date( (new java.util.Date()).getTime

    ()));

    To clear

    wdContext.currentContextElement().setDt(null);

    Regards

    Ayyapparaj

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 21, 2007 at 11:49 AM

    Hi,

    Create a context variable of type date named as "Dummy Date".

    Suppose you have binded "oneDate" context variable of type date to inputfield.

    Now, when you want to clear the date field, set "oneDate" with the value of "Dummy Date.

    Regards,

    Vaibhav

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.