DatePicker next/prev month events

188 views
Skip to first unread message

Nikola Markovic

unread,
Mar 9, 2012, 12:56:35 AM3/9/12
to google-we...@googlegroups.com
Next and previous month buttons in MonthSelector are declared as private and have a default behavior of adding/subtracting one month and refreshing the datepicker. There are no events that fire when this occurs. I've tried to fire my own event, by extending the MonthSelector class and implementing a similar solution like in DefaultMonthSelector, plus firing the event. The problem is that, while calling addMonth(+1) (or -1) from DatePickerComponent i get an illegalAccessModifier exception saying I'm trying to access the com.googl... package from my package.

Tried to work around by calling some other methods, didn't work.

Tried DateChooser(smartGwt) component, but it's all native code and all I can get from the component itself is the name of the Icon rendered as next/prev button. Not sure if messing with native code could solve my problem here.

Thanks in advance,

Nikola Markovic

Nikola Markovic

unread,
Apr 6, 2012, 3:00:53 AM4/6/12
to google-we...@googlegroups.com
Bump, still stuck in here :(

p.s. Thinking of making my own date picker.

Boris Lenzinger

unread,
Apr 6, 2012, 3:35:14 AM4/6/12
to google-we...@googlegroups.com
Hi,

Create your custom class in the same package as google and you should workaround the IllegalAccessException (since method addMonth is protected).

Boris

Le 6 avril 2012 09:00, Nikola Markovic <dev.me...@gmail.com> a écrit :
Bump, still stuck in here :(

p.s. Thinking of making my own date picker.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/gsLA7TQedlUJ.

To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Nikola Markovic

unread,
Apr 7, 2012, 7:23:51 PM4/7/12
to google-we...@googlegroups.com
I'm not sure I understand you. Create a class inside a com.google.gwt.user.datepicker.client package, which is provided in the GWT library as gwt-user.jar? I don't think I know how to.

Andy Stevko

unread,
Apr 7, 2012, 8:15:17 PM4/7/12
to google-we...@googlegroups.com

Yes, create a class in your own project src tree with the Google package name to access default scoped methods.

On Apr 7, 2012 4:23 PM, "Nikola Markovic" <dev.me...@gmail.com> wrote:
I'm not sure I understand you. Create a class inside a com.google.gwt.user.datepicker.client package, which is provided in the GWT library as gwt-user.jar? I don't think I know how to.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.

Nikola Markovic

unread,
Apr 8, 2012, 3:43:37 AM4/8/12
to google-we...@googlegroups.com
It actually worked! Thanks alot guys.
Reply all
Reply to author
Forward
0 new messages