Issues with partial date

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

Issues with partial date

RRichard
Hi all,

We have a requirement where we want to allow user to input an incomplete date (e.g. date is a required field, year and month are mandatory, however exact day is optional)
Is there a good way for handling partial date for a use case like this?
I'm aware of a XBL components (fields-date) which is very close to what I'm looking for, but whenever the "day" is empty the component append "__" to the field. This cause the date to be invalid. Is this to be expected? Is there a way to validate partial date?
(<dateofbirth>2011-11-__</dateofbirth>)

Best,
Richard





--
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: Issues with partial date

Erik Bruchez
Administrator
Richard,

It's possible to validate with the xs:gMonthYear type.

The xs:date type requires a complete date with day.

The date input field assumes xs:date. It would be nice to have a date control able to take just a year, a year/month, or a full date.

-Erik

On Sun, May 1, 2011 at 4:22 PM, Richard Ho <[hidden email]> wrote:
Hi all,

We have a requirement where we want to allow user to input an incomplete date (e.g. date is a required field, year and month are mandatory, however exact day is optional)
Is there a good way for handling partial date for a use case like this?
I'm aware of a XBL components (fields-date) which is very close to what I'm looking for, but whenever the "day" is empty the component append "__" to the field. This cause the date to be invalid. Is this to be expected? Is there a way to validate partial date?
(<dateofbirth>2011-11-__</dateofbirth>)

Best,
Richard





--
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
Reply | Threaded
Open this post in threaded view
|

Re: Issues with partial date

RRichard
>> It's possible to validate with the xs:gMonthYear type.
If I change the type to "xs:gYearMonth", then the calendar icon will disappear. It seems like the type have to be "xs:date".

Is there a good example somewhere that showing how date format should be handled?

>> The date input field assumes xs:date. It would be nice to have a date
control able to take just a year, a year/month, or a full date.
Does this mean the partial date is difficult to achieve with current date input field?
How about the XBL components (fields-date)?
I cann't seem to find any detailed info regarding "fields-date" on the orbeon wiki... :-(

Best,
Richard

On Sun, May 1, 2011 at 4:22 PM, Richard Ho <[hidden email]> wrote:

> Hi all,
>
> We have a requirement where we want to allow user to input an incomplete
> date (e.g. date is a required field, year and month are mandatory, however
> exact day is optional)
> Is there a good way for handling partial date for a use case like this?
> I'm aware of a XBL components (fields-date) which is very close to what I'm
> looking for, but whenever the "day" is empty the component append "__" to
> the field. This cause the date to be invalid. Is this to be expected? Is
> there a way to validate partial date?
> (<dateofbirth>2011-11-__</dateofbirth>)
>
> Best,
> Richard
>
>
>
>
>
> --
> 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

Reply | Threaded
Open this post in threaded view
|

Re: Re: Issues with partial date

Erik Bruchez
Administrator
> If I change the type to "xs:gYearMonth", then the calendar icon will
> disappear. It seems like the type have to be "xs:date".
>
> Is there a good example somewhere that showing how date format should be
> handled?
>>> The date input field assumes xs:date. It would be nice to have a date
> control able to take just a year, a year/month, or a full date.
> Does this mean the partial date is difficult to achieve with current date
> input field?

I think that's unfortunately a fair statement.

> How about the XBL components (fields-date)?

Like the standard date picker, they all deal with dates that include a day.

> I cann't seem to find any detailed info regarding "fields-date" on the
> orbeon wiki... :-(

Have you checked this page:

http://wiki.orbeon.com/forms/doc/developer-guide/xforms-controls/input-control

-Erik

>
> Best,
> Richard
>
> On Sun, May 1, 2011 at 4:22 PM, Richard Ho <[hidden email]>
> wrote:
>
>> Hi all,
>>
>> We have a requirement where we want to allow user to input an incomplete
>> date (e.g. date is a required field, year and month are mandatory, however
>> exact day is optional)
>> Is there a good way for handling partial date for a use case like this?
>> I'm aware of a XBL components (fields-date) which is very close to what
>> I'm
>> looking for, but whenever the "day" is empty the component append "__" to
>> the field. This cause the date to be invalid. Is this to be expected? Is
>> there a way to validate partial date?
>> (<dateofbirth>2011-11-__</dateofbirth>)
>>
>> Best,
>> Richard
>>
>>
>>
>>
>>
>> --
>> 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
>
>
>
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Issues-with-partial-date-tp3488933p3495213.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.
>
>
> --
> 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