SmartGWT - date display in yyyy / MM / dd format

I want to be able to display a date with the ability to enter a date manually. To do this, I assigned the attribute a useTextFieldvalue trueas:

setAttribute("useTextField", true);

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

I tried

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

but nothing happens.

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

Please need help. Thank you very much.

+1
source share
1 answer

You can try

.setDisplayFormat(DateDisplayFormat.TOJAPANSHORTDATE);
+1
source

Source: https://habr.com/ru/post/1792355/


All Articles