Java GWT日期选择器在2.5.1中的更改 背景
在GWT 2.5.0中,文件com.google.GWT.i18n.client.impl.cldr.DateTimeFormatInfoImpl_en将Java GWT日期选择器在2.5.1中的更改 背景,java,gwt,Java,Gwt,在GWT 2.5.0中,文件com.google.GWT.i18n.client.impl.cldr.DateTimeFormatInfoImpl_en将getFirstDayOfWeek定义为: @Override public int firstDayOfTheWeek() { return 0; } 这会导致日历呈现为SMTWTFS 但在更新的GWT 2.5.1中,这被更改为 @Override public int firstDayOfTheWeek() { return
getFirstDayOfWeek
定义为:
@Override
public int firstDayOfTheWeek() {
return 0;
}
这会导致日历呈现为SMTWTFS
但在更新的GWT 2.5.1中,这被更改为
@Override
public int firstDayOfTheWeek() {
return 1;
}
使日历呈现为MTWTFSS
问题 有人知道为什么默认日历会更改吗?我真的不想回去更改我所有的日历
是否有人知道我可以更改为哪个区域设置以使日历显示为SMTWTFS?我不希望创建子类,重写
firstdayOfWeek()
并更改所有日历。我不准备测试此解决方案,但您可以尝试使用。如果它能工作,那么好处就是您不必更改大量代码
1:创建一个新类并重写firstDayOfWeek()方法
2:在gwt.xml模块文件中添加延迟绑定指令
<replace-with class="com.example.sample.CustomDateTimeFormatInfoImpl_en">
<when-type-is class="com.google.gwt.i18n.client.impl.cldr.DateTimeFormatInfoImpl_en"/>
</replace-with>
希望这能帮助你,或者至少能引导你走向正确的方向
<replace-with class="com.example.sample.CustomDateTimeFormatInfoImpl_en">
<when-type-is class="com.google.gwt.i18n.client.impl.cldr.DateTimeFormatInfoImpl_en"/>
</replace-with>