Revalidation of date type fields

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Revalidation of date type fields

Robin Diederen
Revalidation of date type fields

Hello all,

 

On several forms, we use input fields typed as xs:date. The standard validation for these fields works fine: we type or select a date (from the datepicker) and we change the focus to another field. As soon as the field looses focus, the validation kicks in and does its thing.

 

However, in case the value typed in the date field cannot be validated as a valid date, the field is changed (or just displayed) into an untyped input field. Even when we put a valid date there; the only resolutions seems to be to reload the form.

 

We're looking for a solution to have this field revalidated; in case there's a date in that field, we'd like to have it displayed as a regular date field after all. Can this be done easily?

 

Orbeon version: 3.71 (developer relase)

 

Best, Robin



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Revalidation of date type fields

Erik Bruchez-3
Robin,

This is a known issue: if the value does not contain a date, the
validator does not annotate the field as date, and therefore the date
picker doesn't show.

You can work around this by using extra xforms:bind elements forcing
the requested type of those nodes to xs:type.

-Erik

On Fri, Jan 8, 2010 at 7:10 AM, Robin Diederen <[hidden email]> wrote:

> Hello all,
>
>
>
> On several forms, we use input fields typed as xs:date. The standard
> validation for these fields works fine: we type or select a date (from the
> datepicker) and we change the focus to another field. As soon as the field
> looses focus, the validation kicks in and does its thing.
>
>
>
> However, in case the value typed in the date field cannot be validated as a
> valid date, the field is changed (or just displayed) into an untyped input
> field. Even when we put a valid date there; the only resolutions seems to be
> to reload the form.
>
>
>
> We're looking for a solution to have this field revalidated; in case there's
> a date in that field, we'd like to have it displayed as a regular date field
> after all. Can this be done easily?
>
>
>
> Orbeon version: 3.71 (developer relase)
>
>
>
> Best, Robin
>
> --
> You receive this message as a subscriber of the [hidden email] mailing
> list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws