How to define DateField componentError style

Hello everyone,

I am trying to change the icon of the component error for a Single DateField. The problem is that the error component is created on the fly and I cannot access it in order to set my custom style.

I defined my own css

.v-date-field-error .v-errorindicator, .v-errorindicator { background-image: url(img/IconInfoSmall.png); height: 24px; width: 25px; } then in code I set

dateField.addStyleName(".v-date-field-error"); But it doesn’t seems to work.

Any help would be appreciated.

You should have addStyleName(“v-date-field-error”) instead, without the dot. The dot is only used in CSS to mark that you are referring to a class attribute value (“class selector”).