Wednesday, February 8, 2012

Re: Modify DateBox behaviour

No, you'll want your parse method to handle the two digit year by
detecting that the user keyed that and then just returning a Date
object that has the valid years in it.

On Feb 8, 6:23 am, Appien <appienvanv...@gmail.com> wrote:
> HI Jhulford,
>
> I dont get it. What should my parse method do if I not want my Datebox
> to modify the values entered in the DateBox? Should it just return
> null ?
>
> Regards
>
> On Feb 7, 3:34 pm, jhulford <jhulf...@gmail.com> wrote:
>
> > You can pass in your own Format implementation when creating your
> > DateBox and you'll have total control how the text value input from
> > from the user is parsed into a Date object.
>
> > On Feb 7, 1:51 am,Appien<appienvanv...@gmail.com> wrote:
>
> > > Hi folks,
>
> > > Currently I'm struggling the DateBox widget of GWT. It's a nice widget
> > > however I can't find a way to modify its default behaviour. When I
> > > know enter e.g. '12/2/12' it automaticly get parsed and changed the
> > > input to '12/2/0012'. However I want to stop the DateBox from
> > > automatically changing the input and just mark it with the red css
> > > styling if it doesn't match the regular expression dd/mm/yyyy.
>
> > > Is there a way to stop DateBox from automaticallychanging the input?
> > > I've already found the DateBox.DefaultFormat object and found
> > > reference to handler, but could not find the proper way to implement
> > > it.
>
> > > Thanks and regards!

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate