SmartGWT - Display date in yyyy/MM/dd format

2019-08-01 04:06发布

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.

标签: date smartgwt
1条回答
对你真心纯属浪费
2楼-- · 2019-08-01 04:31

You can try

.setDisplayFormat(DateDisplayFormat.TOJAPANSHORTDATE);
查看更多
登录 后发表回答