Changing the Start day of the week on GWT's DateBox/DatePicker widget
Nov 10, 2011
- under:
- java
If you've run into an issue where GWT loads the DateBox component and incorrectly sets the start day to something strange (I was getting Monday, rather than the correct Sunday start day), the problem is a bit vexing and the solution isn't obvious at first. There's no way to change the start using the DateBox api - instead, it's actually tied to the application's il8n/locale settings. Add this to your gwt.xml file:
Show Plain Text
and everything on the calendar should resemble how we do things here in the US..
- <extend-property name='locale' values='en'/>
- <set-property-fallback name='locale' value='en'/>
- <set-property name='locale' value='en'/>