Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GWT DatePicker, scroll by year

Tags:

java

gwt

I might be missing something, but the DatePicker in GWT (I'm using version 2.0.3) doesn't give you the possibility to scroll back and forth by year, only month. Am I missing something? I know there's an external lib (code.google.com/p/gwt-datepicker/) I can use, but I'd like to avoid importing yet another 3rd party lib, when you should be able to do this in the DatePicker provided in GWT.

like image 679
stuff22 Avatar asked Jun 18 '10 22:06

stuff22


1 Answers

You'll need to create a DatePicker subclass that uses your own implementation of MonthSelector.

There's a recent thread on the GWT Google Group on this very topic, with example code:

Getting the default DateBox() picker to advance year at a time

like image 146
Isaac Truett Avatar answered Oct 09 '22 06:10

Isaac Truett