Skip to Content

Date Validation (MM/DD/YYYY)

Hey,

I need Date Validation.

I need to restrict wrong entry of date & previous date also. This can be done either through entry or after clicking on Submit i need to check weather the entered date is valid and it is equal to or after today's date.

Date Format: MM/DD/YYYY.

I need this very urgently. Helpful answer is highly rewarded with Points.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 20, 2008 at 02:02 PM

    Hi Sankar

    You can enter a Validation Pattern in the "Value Tab" of the respective "Object" Tab of your Text/Data Field.

    The rest of the validation logic can be entered as a form Calc-Scipt in a matching even e.g. "pre submit".

    The only problem is to retrieve the data of previoulsly entered dates, I guess you have to store them somewhere.

    Add a comment
    10|10000 characters needed characters exceeded

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

    hi Sankar/Reema

    even i face the same issue i am using the same code but its not working ,can any one help me out

    "my problem is i need to restrict the user from entering the date other than ("DD-MMM-YYYY") format "

    var v_dt = $.rawValue

    if (v_dt "") then

    var v_dtnm = Date2Num(v_dt, "MM/DD/YYYY")

    if (v_dtnm == 0) then

    xfa.host.messageBox("Enter date in MM/DD/YYYY format")

    endif

    endif

    this code is not working

    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.