cancel
Showing results for 
Search instead for 
Did you mean: 

InputField - Date validation

Former Member
0 Kudos

Hello,

I have following problem.

There is an InputField in the View. This value of this InputField is assigned to context element having type DATS (Datumsfeld).

After Entering a date in this Field and selecting an button on this View, an action ist started.

Befor this action is started, there should be a check of the content of the Input field. So, I read the context element, and I do samoe checks.

OK - and now, the problem. Teh problem is, when the date is typed to short, e.g. 01.01.211, i find in the context element not what, really typed in, but something what seems to be an "corrected" date. In this case it is 01.01.2211. ...

But this behaviors is not sattisfied for my customer. They want to have warning, if the date is typed not correctly - not 4-digits.

How can I find the value, wich is really typed into the Input Field, and not corrected by the System ?

Thanks

Wojciech

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member450736
Active Participant
0 Kudos

Hi,

If i understood your correctly, then the problem would be

validation done by system for Date input field which is bound to DATUM or DATS

WD framework will do validation of this field before it passes the correct date entered in the input field to bounded attribute, as you said the corrected date field is already there in the context, i guess that is the previous value which entered correctly.

unless it passes through validation context attribute will not be bound with value entered in input field.

Former Member
0 Kudos

Hi Wojciech,

If you are not much concerned about the value help for that field, then you can try giving the type for that field as CHAR10. Since it is not of type DATUM the system will not correct it automatically and you will get exactly what you have typed.

Later on, you can pass this value into a field of type DATUM and do your processing.

If you want the value help also to come for this field then may be you can search for some FM which will serve the purpose.

Regards,

Anand