Binding to xs:dateTime

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

Binding to xs:dateTime

mjgraham
Hi,

I have some fields which require xs:dateTime values. The bind works fine
but the calendar widget appears on the form and this, of course, only
allows dates to be set so I then get an validation error. How can I get
around this?

    Cheers,

    Matthew



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Binding to xs:dateTime

Alessandro  Vernet
Administrator
Hi Matthew,

The calendar widget is only displayed when your node has the type
xs:date. For xs:dateTime, we would need a new widget that allows a
time of the day to be entered in addition to the date.

Alex

On 1/4/06, Matthew Graham <[hidden email]> wrote:

> Hi,
>
> I have some fields which require xs:dateTime values. The bind works fine
> but the calendar widget appears on the form and this, of course, only
> allows dates to be set so I then get an validation error. How can I get
> around this?
>
>     Cheers,
>
>     Matthew
>
>
>
>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>

--
Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Binding to xs:dateTime

mjgraham
Alessandro Vernet wrote:

>Hi Matthew,
>
>The calendar widget is only displayed when your node has the type
>xs:date. For xs:dateTime, we would need a new widget that allows a
>time of the day to be entered in addition to the date.
>
>Alex
>
>On 1/4/06, Matthew Graham <[hidden email]> wrote:
>  
>
>>Hi,
>>
>>I have some fields which require xs:dateTime values. The bind works fine
>>but the calendar widget appears on the form and this, of course, only
>>allows dates to be set so I then get an validation error. How can I get
>>around this?
>>
Hi,

Unfortunately this is not what I am seeing: the widget is displayed for
my nodes even though their type is defined as xs:dateTime.

    Cheers,

    Matthew



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Binding to xs:dateTime

Alessandro  Vernet
Administrator
Hi Matthew,

I guess my answer was not clear enough.

The calendar widget is only displayed if the type is xs:date. If the
type is xs:dateTime, nothing happens at this point. The reason is that
we would need a widget that lets you enter a date and a time of the
day, and we don't have this widget at this point.

A possible workaround would be to use two nodes in your instance: one
for the date (type xs:date, rendered with the calendar widget) and one
with the time (type xs:time, rendered as a text field, but the engine
would make sure that the value entered is systemically correct).

Alex

On 1/6/06, Matthew Graham <[hidden email]> wrote:

> Alessandro Vernet wrote:
>
> >Hi Matthew,
> >
> >The calendar widget is only displayed when your node has the type
> >xs:date. For xs:dateTime, we would need a new widget that allows a
> >time of the day to be entered in addition to the date.
> >
> >Alex
> >
> >On 1/4/06, Matthew Graham <[hidden email]> wrote:
> >
> >
> >>Hi,
> >>
> >>I have some fields which require xs:dateTime values. The bind works fine
> >>but the calendar widget appears on the form and this, of course, only
> >>allows dates to be set so I then get an validation error. How can I get
> >>around this?
> >>
> Hi,
>
> Unfortunately this is not what I am seeing: the widget is displayed for
> my nodes even though their type is defined as xs:dateTime.
>
>     Cheers,
>
>     Matthew
>
>
>
>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>

--
Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Binding to xs:dateTime

mjgraham
Alessandro Vernet wrote:

>Hi Matthew,
>
>I guess my answer was not clear enough.
>
>The calendar widget is only displayed if the type is xs:date. If the
>type is xs:dateTime, nothing happens at this point. The reason is that
>we would need a widget that lets you enter a date and a time of the
>day, and we don't have this widget at this point.
>
>A possible workaround would be to use two nodes in your instance: one
>for the date (type xs:date, rendered with the calendar widget) and one
>with the time (type xs:time, rendered as a text field, but the engine
>would make sure that the value entered is systemically correct).
>
>Alex
>
>On 1/6/06, Matthew Graham <[hidden email]> wrote:
>  
>
>>Alessandro Vernet wrote:
>>
>>    
>>
>>>Hi Matthew,
>>>
>>>The calendar widget is only displayed when your node has the type
>>>xs:date. For xs:dateTime, we would need a new widget that allows a
>>>time of the day to be entered in addition to the date.
>>>
>>>Alex
>>>
>>>On 1/4/06, Matthew Graham <[hidden email]> wrote:
>>>
>>>
>>>      
>>>
>>>>Hi,
>>>>
>>>>I have some fields which require xs:dateTime values. The bind works fine
>>>>but the calendar widget appears on the form and this, of course, only
>>>>allows dates to be set so I then get an validation error. How can I get
>>>>around this?
>>>>
>>>>        
>>>>
>>Hi,
>>
>>Unfortunately this is not what I am seeing: the widget is displayed for
>>my nodes even though their type is defined as xs:dateTime.
>>
>>    Cheers,
>>
>>    Matthew
>>
>>
>>
>>
>>--
>>
Hi Alex,

What I see when I run my app is the calendar widget appearing for types
which are defined to be xs:dateTime so I think there is a bug here.

    Cheers,

    MAtthew



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Binding to xs:dateTime

Alessandro  Vernet
Administrator
Indeed, this is a bug.

http://forge.objectweb.org/tracker/index.php?func=detail&aid=304438&group_id=168&atid=350207

Alex

On 1/6/06, Matthew Graham <[hidden email]> wrote:

> Alessandro Vernet wrote:
>
> >Hi Matthew,
> >
> >I guess my answer was not clear enough.
> >
> >The calendar widget is only displayed if the type is xs:date. If the
> >type is xs:dateTime, nothing happens at this point. The reason is that
> >we would need a widget that lets you enter a date and a time of the
> >day, and we don't have this widget at this point.
> >
> >A possible workaround would be to use two nodes in your instance: one
> >for the date (type xs:date, rendered with the calendar widget) and one
> >with the time (type xs:time, rendered as a text field, but the engine
> >would make sure that the value entered is systemically correct).
> >
> >Alex
> >
> >On 1/6/06, Matthew Graham <[hidden email]> wrote:
> >
> >
> >>Alessandro Vernet wrote:
> >>
> >>
> >>
> >>>Hi Matthew,
> >>>
> >>>The calendar widget is only displayed when your node has the type
> >>>xs:date. For xs:dateTime, we would need a new widget that allows a
> >>>time of the day to be entered in addition to the date.
> >>>
> >>>Alex
> >>>
> >>>On 1/4/06, Matthew Graham <[hidden email]> wrote:
> >>>
> >>>
> >>>
> >>>
> >>>>Hi,
> >>>>
> >>>>I have some fields which require xs:dateTime values. The bind works fine
> >>>>but the calendar widget appears on the form and this, of course, only
> >>>>allows dates to be set so I then get an validation error. How can I get
> >>>>around this?
> >>>>
> >>>>
> >>>>
> >>Hi,
> >>
> >>Unfortunately this is not what I am seeing: the widget is displayed for
> >>my nodes even though their type is defined as xs:dateTime.
> >>
> >>    Cheers,
> >>
> >>    Matthew
> >>
> >>
> >>
> >>
> >>--
> >>
> Hi Alex,
>
> What I see when I run my app is the calendar widget appearing for types
> which are defined to be xs:dateTime so I think there is a bug here.
>
>     Cheers,
>
>     MAtthew
>
>
>
>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>

--
Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Binding to xs:dateTime

Alessandro  Vernet
Administrator
Alright Matthew, this one is fixed. Thank you for reporting it, and
I'm sorry for the initial misunderstanding.

Alex

On 1/6/06, Alessandro Vernet <[hidden email]> wrote:

> Indeed, this is a bug.
>
> http://forge.objectweb.org/tracker/index.php?func=detail&aid=304438&group_id=168&atid=350207
>
> Alex
>
> On 1/6/06, Matthew Graham <[hidden email]> wrote:
> > Alessandro Vernet wrote:
> >
> > >Hi Matthew,
> > >
> > >I guess my answer was not clear enough.
> > >
> > >The calendar widget is only displayed if the type is xs:date. If the
> > >type is xs:dateTime, nothing happens at this point. The reason is that
> > >we would need a widget that lets you enter a date and a time of the
> > >day, and we don't have this widget at this point.
> > >
> > >A possible workaround would be to use two nodes in your instance: one
> > >for the date (type xs:date, rendered with the calendar widget) and one
> > >with the time (type xs:time, rendered as a text field, but the engine
> > >would make sure that the value entered is systemically correct).
> > >
> > >Alex
> > >
> > >On 1/6/06, Matthew Graham <[hidden email]> wrote:
> > >
> > >
> > >>Alessandro Vernet wrote:
> > >>
> > >>
> > >>
> > >>>Hi Matthew,
> > >>>
> > >>>The calendar widget is only displayed when your node has the type
> > >>>xs:date. For xs:dateTime, we would need a new widget that allows a
> > >>>time of the day to be entered in addition to the date.
> > >>>
> > >>>Alex
> > >>>
> > >>>On 1/4/06, Matthew Graham <[hidden email]> wrote:
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>>Hi,
> > >>>>
> > >>>>I have some fields which require xs:dateTime values. The bind works fine
> > >>>>but the calendar widget appears on the form and this, of course, only
> > >>>>allows dates to be set so I then get an validation error. How can I get
> > >>>>around this?
> > >>>>
> > >>>>
> > >>>>
> > >>Hi,
> > >>
> > >>Unfortunately this is not what I am seeing: the widget is displayed for
> > >>my nodes even though their type is defined as xs:dateTime.
> > >>
> > >>    Cheers,
> > >>
> > >>    Matthew
> > >>
> > >>
> > >>
> > >>
> > >>--
> > >>
> > Hi Alex,
> >
> > What I see when I run my app is the calendar widget appearing for types
> > which are defined to be xs:dateTime so I think there is a bug here.
> >
> >     Cheers,
> >
> >     MAtthew
> >
> >
> >
> >
> > --
> > 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
> > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
> >
> >
> >
>
>
> --
> Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/
>

--
Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Binding to xs:dateTime

Adrian Baker-2
In reply to this post by Alessandro Vernet
Alessandro Vernet wrote:
> Hi Matthew,
>
> I guess my answer was not clear enough.
>
> The calendar widget is only displayed if the type is xs:date. If the
> type is xs:dateTime, nothing happens at this point. The reason is that
> we would need a widget that lets you enter a date and a time of the
> day, and we don't have this widget at this point.
The calendar package used by OPS
(http://www.dynarch.com/projects/calendar/) supports entering the time.
It's not a great interface, but could it be sufficient at least in the
interim?

Adrian



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Binding to xs:dateTime

Erik Bruchez
Administrator
Possibly. Any taker?

I have entered a bug to track this:

http://forge.objectweb.org/tracker/index.php?func=detail&aid=304675&group_id=168&atid=350207

-Erik

Adrian Baker wrote:

> Alessandro Vernet wrote:
>> Hi Matthew,
>>
>> I guess my answer was not clear enough.
>>
>> The calendar widget is only displayed if the type is xs:date. If the
>> type is xs:dateTime, nothing happens at this point. The reason is that
>> we would need a widget that lets you enter a date and a time of the
>> day, and we don't have this widget at this point.
> The calendar package used by OPS
> (http://www.dynarch.com/projects/calendar/) supports entering the time.
> It's not a great interface, but could it be sufficient at least in the
> interim?
>
> Adrian



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Binding to xs:dateTime

Adrian Baker-2
I've started looking at how best to implement this.

Firstly, I've noticed that a javascript calendar object is initialised
for *every* <xforms:input>, regardless of datatype (and then the icon
only displayed for actual date fields):

if (className == "xforms-input") {

    var inputField = element.childNodes[1];
    var showCalendar = element.childNodes[2];

    if (!element.styleListenerRegistered) {
        element.styleListenerRegistered = true;

        // Assign ids to input field and icon for date picker
        inputField.id = "input-" + element.id;
        showCalendar.id = "showcalendar-" + element.id;

        // Setup calendar library
        Calendar.setup({
            inputField     :    inputField.id,
            ifFormat       :    "%Y-%m-%d",
            showsTime      :    false,
            button         :    element.id,
            singleClick    :    true,
            step           :    1,
            onUpdate       :    xformsCalendarUpdate,
            electric       :    true
        });

        element.xformsJscalendarOnClick = element.onclick;
        element.onclick = xformsCalendarClick;
    }
}

At least it's only initialised once for every field, but this is still
pretty wasteful: the calendar library is pretty big.

If we extend the if clause so it contains:
if(xformsArrayContains(inputField.className.split(" "),
"xforms-type-date") && !element.styleListenerRegistered) {
    ...
    Calendar.setup({
       ...
}

Then we only get the calendar initialized only for date fields, which is
only when it's going to be used. I've tested this on a form with a
dynamic datatype field (ie you can change a field to/from a date ) as
well as static forms and it works ok.

Adrian

Erik Bruchez wrote:

> Possibly. Any taker?
>
> I have entered a bug to track this:
>
> http://forge.objectweb.org/tracker/index.php?func=detail&aid=304675&group_id=168&atid=350207 
>
>
> -Erik
>
> Adrian Baker wrote:
>> Alessandro Vernet wrote:
>>> Hi Matthew,
>>>
>>> I guess my answer was not clear enough.
>>>
>>> The calendar widget is only displayed if the type is xs:date. If the
>>> type is xs:dateTime, nothing happens at this point. The reason is that
>>> we would need a widget that lets you enter a date and a time of the
>>> day, and we don't have this widget at this point.
>> The calendar package used by OPS
>> (http://www.dynarch.com/projects/calendar/) supports entering the
>> time. It's not a great interface, but could it be sufficient at least
>> in the interim?
>>
>> Adrian


--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Binding to xs:dateTime

Adrian Baker-2
In reply to this post by Erik Bruchez
I hit some obstacles trying to wire in the time input support of the
www.dynarch.com calendar:
- no support for milliseconds or timezones in date format. The XML
Schema dateTime format has these as optional so it could still produce
valid dates. But to be safe we'd need some nasty javascript hackery to
preserve these if they were specified in the backend value, otherwise
they'd get deleted when the dateTime was updated.
- no support for entering seconds.
- buggy parsing means specifying seconds in the date format causes
minutes to be read as hours, spec. eg running
   
alert(Date.parseDate("1999-05-31T13:20:00","%Y-%m-%dT%H:%M:%S").getHours());
displays 20, which is the number of minutes not the number of hours.
Seconds are *not* optional in the Schema, so this is a showstopper.
Probably a small enough bug in the parser, but at this point I'd had enough.

I'm thinking now the best way forward is to only use the calendar widget
for entering the date, since it's good at this, and use a separate field
or fields to enter time, which means having customisable
format/precision is possible. How does this fit with the grand plan for
dateTime input in OPS? :)

Adrian

Erik Bruchez wrote:

> Possibly. Any taker?
>
> I have entered a bug to track this:
>
> http://forge.objectweb.org/tracker/index.php?func=detail&aid=304675&group_id=168&atid=350207 
>
>
> -Erik
>
> Adrian Baker wrote:
>> Alessandro Vernet wrote:
>>> Hi Matthew,
>>>
>>> I guess my answer was not clear enough.
>>>
>>> The calendar widget is only displayed if the type is xs:date. If the
>>> type is xs:dateTime, nothing happens at this point. The reason is that
>>> we would need a widget that lets you enter a date and a time of the
>>> day, and we don't have this widget at this point.
>> The calendar package used by OPS
>> (http://www.dynarch.com/projects/calendar/) supports entering the
>> time. It's not a great interface, but could it be sufficient at least
>> in the interim?
>>
>> Adrian
>
>
> ------------------------------------------------------------------------
>
>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Binding to xs:dateTime

Adrian Baker-2
Adrian Baker wrote:

> I hit some obstacles trying to wire in the time input support of the
> www.dynarch.com calendar:
> - no support for milliseconds or timezones in date format. The XML
> Schema dateTime format has these as optional so it could still produce
> valid dates. But to be safe we'd need some nasty javascript hackery to
> preserve these if they were specified in the backend value, otherwise
> they'd get deleted when the dateTime was updated.
> - no support for entering seconds.
> - buggy parsing means specifying seconds in the date format causes
> minutes to be read as hours, spec. eg running
>    
> alert(Date.parseDate("1999-05-31T13:20:00","%Y-%m-%dT%H:%M:%S").getHours());
>
> displays 20, which is the number of minutes not the number of hours.
> Seconds are *not* optional in the Schema, so this is a showstopper.
> Probably a small enough bug in the parser, but at this point I'd had
> enough.
>
> I'm thinking now the best way forward is to only use the calendar
> widget for entering the date, since it's good at this, and use a
> separate field or fields to enter time, which means having
> customisable format/precision is possible. How does this fit with the
> grand plan for dateTime input in OPS? :)
The other advantage of course is that the control can be reused for
input of xs:time.



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Binding to xs:dateTime

Alessandro  Vernet
Administrator
In reply to this post by Adrian Baker-2
Adrian,

Yes, I agree, we should not initialize the calendar when it is not
going to be used. I integrated your code, and it will be in the next
"unstable build".

Alex

On 3/5/06, Adrian Baker <[hidden email]> wrote:

> I've started looking at how best to implement this.
>
> Firstly, I've noticed that a javascript calendar object is initialised
> for *every* <xforms:input>, regardless of datatype (and then the icon
> only displayed for actual date fields):
>
> if (className == "xforms-input") {
>
>     var inputField = element.childNodes[1];
>     var showCalendar = element.childNodes[2];
>
>     if (!element.styleListenerRegistered) {
>         element.styleListenerRegistered = true;
>
>         // Assign ids to input field and icon for date picker
>         inputField.id = "input-" + element.id;
>         showCalendar.id = "showcalendar-" + element.id;
>
>         // Setup calendar library
>         Calendar.setup({
>             inputField     :    inputField.id,
>             ifFormat       :    "%Y-%m-%d",
>             showsTime      :    false,
>             button         :    element.id,
>             singleClick    :    true,
>             step           :    1,
>             onUpdate       :    xformsCalendarUpdate,
>             electric       :    true
>         });
>
>         element.xformsJscalendarOnClick = element.onclick;
>         element.onclick = xformsCalendarClick;
>     }
> }
>
> At least it's only initialised once for every field, but this is still
> pretty wasteful: the calendar library is pretty big.
>
> If we extend the if clause so it contains:
> if(xformsArrayContains(inputField.className.split(" "),
> "xforms-type-date") && !element.styleListenerRegistered) {
>     ...
>     Calendar.setup({
>        ...
> }
>
> Then we only get the calendar initialized only for date fields, which is
> only when it's going to be used. I've tested this on a form with a
> dynamic datatype field (ie you can change a field to/from a date ) as
> well as static forms and it works ok.
>
> Adrian
>
> Erik Bruchez wrote:
> > Possibly. Any taker?
> >
> > I have entered a bug to track this:
> >
> > http://forge.objectweb.org/tracker/index.php?func=detail&aid=304675&group_id=168&atid=350207
> >
> >
> > -Erik
> >
> > Adrian Baker wrote:
> >> Alessandro Vernet wrote:
> >>> Hi Matthew,
> >>>
> >>> I guess my answer was not clear enough.
> >>>
> >>> The calendar widget is only displayed if the type is xs:date. If the
> >>> type is xs:dateTime, nothing happens at this point. The reason is that
> >>> we would need a widget that lets you enter a date and a time of the
> >>> day, and we don't have this widget at this point.
> >> The calendar package used by OPS
> >> (http://www.dynarch.com/projects/calendar/) supports entering the
> >> time. It's not a great interface, but could it be sufficient at least
> >> in the interim?
> >>
> >> Adrian
>
>
>
>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>

--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Binding to xs:dateTime

Alessandro  Vernet
Administrator
In reply to this post by Adrian Baker-2
Adrian,

I have not been very convinced by the UI provided by jscalendar to
enter times. For that reason alone I am not really in favor of using
that component for that purpose, and to this you are adding valid
technical reasons.

So it looks like we would be looking at using another widget for the
time part. We would be combined this other widget with jscalendar to
handle xs:dateTime. We are not planning to implement this in the short
term, so if you develop code providing a specialized widget for
xs:time and xs:dataTime, we'll be happy to consider it to be
integrated in PresentationServer :).

Alex

On 3/5/06, Adrian Baker <[hidden email]> wrote:

> I hit some obstacles trying to wire in the time input support of the
> www.dynarch.com calendar:
> - no support for milliseconds or timezones in date format. The XML
> Schema dateTime format has these as optional so it could still produce
> valid dates. But to be safe we'd need some nasty javascript hackery to
> preserve these if they were specified in the backend value, otherwise
> they'd get deleted when the dateTime was updated.
> - no support for entering seconds.
> - buggy parsing means specifying seconds in the date format causes
> minutes to be read as hours, spec. eg running
>
> alert(Date.parseDate("1999-05-31T13:20:00","%Y-%m-%dT%H:%M:%S").getHours());
> displays 20, which is the number of minutes not the number of hours.
> Seconds are *not* optional in the Schema, so this is a showstopper.
> Probably a small enough bug in the parser, but at this point I'd had enough.
>
> I'm thinking now the best way forward is to only use the calendar widget
> for entering the date, since it's good at this, and use a separate field
> or fields to enter time, which means having customisable
> format/precision is possible. How does this fit with the grand plan for
> dateTime input in OPS? :)
>
> Adrian
>
> Erik Bruchez wrote:
> > Possibly. Any taker?
> >
> > I have entered a bug to track this:
> >
> > http://forge.objectweb.org/tracker/index.php?func=detail&aid=304675&group_id=168&atid=350207
> >
> >
> > -Erik
> >
> > Adrian Baker wrote:
> >> Alessandro Vernet wrote:
> >>> Hi Matthew,
> >>>
> >>> I guess my answer was not clear enough.
> >>>
> >>> The calendar widget is only displayed if the type is xs:date. If the
> >>> type is xs:dateTime, nothing happens at this point. The reason is that
> >>> we would need a widget that lets you enter a date and a time of the
> >>> day, and we don't have this widget at this point.
> >> The calendar package used by OPS
> >> (http://www.dynarch.com/projects/calendar/) supports entering the
> >> time. It's not a great interface, but could it be sufficient at least
> >> in the interim?
> >>
> >> Adrian
> >
> >
> > ------------------------------------------------------------------------
> >
> >
> > --
> > 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
> > ObjectWeb mailing lists service home page: http://www.objectweb.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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>

--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet