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

Adobe forms date Validation

In my Adobe form ,

I have date format (DD-MMM-YYYY). So, I have specified the properties asDisplay Pattern, Edit Pattern and Validation Pattern for Date field as

DD-MMM-YYYY.

It is working fine. But the problem is, Date field is not clearing, if

the user enters the date in wrong format (ex. Dec 02, 08). I am getting

only the error message what I specified in validation error message box.

Please let me know how to clear the date/time field and set the focus

back to the same field if the user enter the date in wrong format.

by

charles

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 Dec 15, 2008 at 05:34 AM

    Hi,

    Check the below code using SimpleDateFormat:

    1.Create simpledateformat:

    SimpleDateFormat objDateFormat = new SimpleDateFormat("DD-MMM-YYYY");

    2.Get the context date

    contextdate = wdContext.currentContextElement..getbegda();

    3.Formate the context date

    objDateFormat.format(contextdate );

    Reagrds,

    Lavanya.G

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 15, 2008 at 06:22 AM

    hi ,

    I think u can use script for this in forms

    Thanks and Regards

    shanto aloor

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 23, 2008 at 06:41 AM

    I cant understand ur explanation .can u pls give ur code

    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.