I am just using the default settings ...

<s:datetimepicker name="bean.dateString" />

when the form is submitted i see that there are actually 2 values submitted, the dojo.bean.dateString and bean.dateString. the format for dojo.bean.dateString is RFC 3339 and the format of bean.dateString is DateFormat.SHORT (mm/dd/yy).

if i start with a fresh form and no pre-populated data, select a date and submit, the value is properly in 2007. but if that field is pre-populated because of a validation error or from existing data then it seems to always show 1907, both in the date selector and in the value if i submit the form again.

i am assuming that when the datetimepicker is being initialized from an existing value it has to be looking at the value of bean.dateString, which if i select today has a value of "6/5/07". perhaps it's not properly converting that display date into the RFC 3339 value it uses internally?

-- Allen


Musachy Barroso wrote:
What is the format of the date in the string? If you stick to RFC 3339 it
should be fine : yyyy-MM-dd (this is just the value, the display format can
be set using the "displayFormat" attribute)

musachy

On 6/5/07, Allen Gilliland <[EMAIL PROTECTED]> wrote:

I'm having a problem with the datetimepicker where it always thinks the
year is 1907 when it gets loaded from an existing value.  I have only
been able to find this thread on the issue which suggests there is a bug
but doesn't really provide any real work around ...

http://www.mail-archive.com/user@struts.apache.org/msg61093.html

I am using a String to store the value from the date picker as suggested
by the last message in the thread but I am still getting the same
behavior.

Is there any solution or work around to this problem using struts 2.0.6?

-- Allen

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to