Sunday, February 19, 2012

Read Only DateBox

Hi,

A DateBox can be set to setEnabled(false), however, it does not have a
setReadOnly(true). And calling dateBox.getTextBox().setReadOnly(true)
does not work.

This is annoying, as browsers do nasty things to the text color when
you disable the field (which CSS doesn't seem to be able to override).

Does anyone has a nice solution to having a disabled or read only
DateBox, that can have any text colour?

Thanks.

PS: As a work around, I have a DateBox and a TextBox. When I want to
disabled the DateBox, I just hide it and show the read only TextBox,
copying in the the value across like this
myTextBox.setValue(myDateDateBox.getTextBox().getValue());

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment