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

Validation for date field

Hi,

I have to validate the date field when it is blank. I have two buttons one to clear date and one for submit. Validation should be done on submit click.

But the problem is that when I am clearing the date Inputfield the two dots ( . ) between the date value( like if date is 24.10.2007 the after clearing . . like this is in the inputfield which is not initial ) are not clearing so that the validation code not checking date as initial.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

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

    Hi,

    Why not clear the input field after checking this,

    dateinput = dateinputfield.toString().replaceAll("..","");

    like in this [thread|DOB : Date validation with 4 conditions;

    Regards,

    Harini S

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      I mean you can try writing logic where you are clearing the input field to replace these dots also. I haven't worked in WD for ABAP but have worked in WD for Java. So think similar logic can help for ABAP also.

      Regards,

      Harini S

  • author's profile photo Former Member
    Former Member
    Posted on Apr 14, 2008 at 09:28 AM

    Hi experts,

    Can anybody provide the solution for this????

    Thanks in advance!

    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.