SmartGwt DateItem useTextField = true - how to make the text input field Uneditable

Since I cannot understand how to solve the problem I have presented here , I am now thinking of a temporary solution.

I have a smartgwt widget DateItem:

DateItem date = new DateItem("Adate");
date.setWidth(120);
date.setWrapTitle(false);
date.setAttribute("useTextField", true); 
date.setAttribute("inputFormat", "yyyy/MM/dd");
date.setAttribute("displayFormat", "toJapanShortDate");

Since the attribute is useTextFieldset to value true, we can see the text input field. How can I make this text input field invalid. In fact, I only want to be able to select a date from the calendar and not change it manually.

Solved - the problem described above - thanks to user @RAS.

TextItem textItem = new TextItem();
textItem.setAttribute("readOnly", true);
date.setAttribute("textFieldProperties", textItem); 

Related Links

( - . ): , "". , 30/05/2009 , , , date, 30 2009 . ? ?

- ** ? ** (- )

.

+3

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


All Articles