Ok, you convinced me to stick to one date format:
MM/dd/yy.

However, even though my JSP looks like this:

      <s:datetimepicker id="selectedDate" 
                        name="selectedDate" 
                        displayWeeks="5" 
                        displayFormat= "MM/dd/yy"
                        value="%{'01/21/07'}"/>
       
It is still showing 01/21/2007.  Interestingly, it
allows 01/22/07 as input, but changes it to 01/22/2007
on blur.

Any suggestions?  Does the datetimepicker force a
four-digit year?  If so, is this addressed in 2.1?

My calendar will not go before the year 2007 so I am
not worried about Y2K-type issues.

Thanks,

Scott

---

Nope. I'm not so sure that's a good idea as you
wouldn't have any way 
to
parse that date on the server (without knowing the
right format).

Warning! bad advise ahead: You can always do something
crazy like:

dojo.widget.byId("dp").setValue = function(dateObj) {
};

and then do your thing there, or extend
StrusDatePicker widget, which I
would strongly advise not to :)

musachy

On 6/12/07, Scott Nesbitt <[EMAIL PROTECTED]>
wrote:
>
>
> I have this code:
>
> <s:datetimepicker id="selectedDate"
>                   name="selectedDate"
>                   displayWeeks="5"
>                   displayFormat= "MM-dd-yyyy"
>
>
>
> value="%{userDetailsBean.selectDateString}"/>
>
> It works fine if the user uses the drop-down or
types
> in a date in just the right format.  However, we
would
> like the following to work better:
>
> user input   actual value                 desired
> value
> ----------   ------------
> -------------
> 06-12-07     NaN-NaN-0NaN                 06-12-2007
> 06/13/2007   06-12-2007  (refused change) 06-13-2007
> 06 13 2007   06-12-2007  (refused change) 06-13-2007
> etc.
>
> Basically, I would like to allow multiple date
formats
> in order to make life easier for my users.
>
> Can I intercept the user input somehow before it
goes
> to the validation and fix it up?
>
> Thanks,
>
> Scott
>
>
>
>
>
> 


       
____________________________________________________________________________________
Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
 

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

Reply via email to