SmartGWT - Display date in yyyy/MM/dd format

这一生的挚爱 提交于 2020-01-06 02:19:29

问题


I want to have the possibility to display a date with the possibility to enter the date manually. For this I've uset the attribute useTextField set to true like:

setAttribute("useTextField", true);

Now I want the format of date to be yyyy/MM/dd.

I've tryed with

setAttribute("displayFormat ", "TOJAPANSHORTDATE");
setAttribute("inputFormat ", "YMD");

but nothing happen.

I need to use attributes. What attribute should I use? And with what value?

Please, need help. Thanks you a lot.


回答1:


You can try

.setDisplayFormat(DateDisplayFormat.TOJAPANSHORTDATE);


来源:https://stackoverflow.com/questions/4747288/smartgwt-display-date-in-yyyy-mm-dd-format

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!