DatePicker : clear all styles

65 views
Skip to first unread message

philippe

unread,
Nov 29, 2011, 10:03:49 AM11/29/11
to google-we...@googlegroups.com
In the DatePicker widget, I can easily mark some dates with the 'addStylesToDate' method. My problem is I can't found a way to clear all special styles (useful in a re-use case). Has somebody found a clever way to do this ?
Thanks !

Sean

unread,
Jan 10, 2012, 8:04:08 AM1/10/12
to google-we...@googlegroups.com
I'm still waiting for a way to do this. Everything is private, you can't even extend and create your own. Or CnP the source, because many of the classes it uses aren't visible either. 

Has anyone found a replacement for the gwt Date Picker? 

Such a nice widget, not sure why they made it so un-extendable.

Sean

unread,
Jan 10, 2012, 1:16:48 PM1/10/12
to google-we...@googlegroups.com
So I got around the not being able to extend the class by copying:
CalendarModel.java
CalendarUtil.java
CalendarView.java
CellGridImpl.java
DateBox.java
DateChangeEvent.java
DatePicker.java
DatePickerComponent.java
DefaultCalendarView.java
DefaultMonthSelector.java
MonthSelector.java

from the gwt-user.jar and putting them in my project. Changing all private to protected. I also had to delete the CSS line call to dayIsWeekend() because it would overwrite any style I added. So all weekdays looked perfect, but weekends were un-affected. 

Not the prettiest of solutions, but it works.
Reply all
Reply to author
Forward
0 new messages