Pretty much, what the title says. I need to make the GWT DatePicker component use Monday as the first day of the week. Currently the day labels are S M T W T F S, I want it to be M T W T F S S. Any way to accomplish it?
Pretty much, what the title says. I need to make the GWT DatePicker component
Share
If the automatic locale detection doesn’t fit your needs (and probably editing the
firstDayOfTheWeekincom.google.gwt.i18n.client.constants.DateTimeConstantsImpl_xy.propertieswon’t be either), the only option would be to modify the implementation of DatePicker:Extend DatePicker, write a new constructor which calls the protected
DatePicker(MonthSelector monthSelector, CalendarView view, CalendarModel model)constructor with your own view and model.The CalendarModel can be extended, so you’d have to override
getCurrentFirstDayOfFirstWeek.The
DefaultCalendarViewis final, so you’d have to copy it to a new class and modify itssetupmethod.It’s quite messy, and that’s the little downside of GWT – it makes heavy use of Singletons instead of Dependency Injection…