cancel
Showing results for 
Search instead for 
Did you mean: 

Date input field validation

Former Member
0 Kudos

Hi,

I have input fields for date and time simple types, each defined with a mask.

When the user enters 1030 in the time field and enters, the mask is applied and the correct string 10:30 appears.

I would like to have the same behavior for the date field, so when the user enters 11112007 the string 11.11.2007 should appear.

I can't get it done, since the framework validation seems to prevent the launching of an onenter action in case the date format is wrong. Any suggestions?

Roelof

Accepted Solutions (1)

Accepted Solutions (1)

sridhar_k2
Active Contributor
0 Kudos

Roelof,

After Binding Inputfield with Simple Type - type - date, it is converting the entered date to 11/11/2007. For the validation, for the Button Action tab, select the 'Without Validation' from actions tab.

Regards,

Sridhar

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi roelof,

make ur event non validating.

regards

Sumit

Former Member
0 Kudos

Thanks. Next problem though: how to validate the <b>new</b> value the user entered. I can only obtain the old value from the context.

So how do I get the new value the user just entered?

Thanks,

Roelof

Former Member
0 Kudos

Hi,

Normaly after a round trip context attribute holds the new value. If its not a calculated attribute.

Regards

Ayyapparaj

Former Member
0 Kudos

When user enters any new value, the old data is lost for that instance unless saved.

if you want to check and confirm its value at that instance by any event,

in iView,

on click of any event put this

wdComponentAPI.getMessageManager().reportSuccess(wdContext.current<Node or Context>Element().get<Attribute>());

Former Member
0 Kudos

What - in this context - defines a round trip?

Thanks in advance, Roelof

Former Member
0 Kudos

Hi,

A round trip can be triggered by an action or if you have an SVS.

If you need to explicitly check some thing make use of calculated attributes,

In the setter of the calculated attribute their is a param "value" which returns the new value.

Regards

Ayyapparaj