Java GWT日期框格式

Java GWT日期框格式,java,gwt,Java,Gwt,我想将格式设置为GWT中的日期框 所需格式为dd/MM/yyyy 我尝试使用: DateTimeFormat dateFormat = DateTimeFormat.getFormat("dd/MM/yyyy"); dateBoxObj.setFormat(new DateBox.DefaultFormat(dateFormat)); 任何帮助???交叉检查您导入的DateTimeFormat…使用此com.google.gwt.i18n.client.DateTimeFormat…看起来上面

我想将格式设置为GWT中的日期框

所需格式为
dd/MM/yyyy

我尝试使用:

DateTimeFormat dateFormat = DateTimeFormat.getFormat("dd/MM/yyyy");
dateBoxObj.setFormat(new DateBox.DefaultFormat(dateFormat));

任何帮助???

交叉检查您导入的DateTimeFormat…使用此com.google.gwt.i18n.client.DateTimeFormat…看起来上面的代码应该可以工作。。。 我也使用了这个日期时间格式。。。像这样

Date date = event.getValue(); //Date from Selection
String dateString = DateTimeFormat.getFormat("MM/dd/yyyy").format(date);
textbox.setValue(dateString); //this date is in form of "MM/dd/yyyy"

你试对了。怎么了?谢谢你的帮助。但是它将格式设置为yyyy/MM/dd,尽管我已经将格式设置为dd/MM/yyyy