cancel
Showing results for 
Search instead for 
Did you mean: 

Validation for date field

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi experts,

Can anybody provide the solution for this????

Thanks in advance!

Former Member
0 Kudos

Hi,

Why not clear the input field after checking this,

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

like in this [thread|;

Regards,

Harini S

Former Member
0 Kudos

Hi,

Can you please explain a bit more I am new to webdynpro ABAP!!

Former Member
0 Kudos

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