PDA

View Full Version : labelCls does not work



xun
26 Apr 2012, 8:38 AM
hi, i have a datefield, i set the labelCls, however it does not make a difference, because the markup adds its own style and overwrite the css class.

The following is the date field.
this.toDateField = {
xtype: 'datefield',
labelCls: 'dateFieldLabel',
fieldLabel: 'to',
id: 'enddt',
width:110,
maxValue: this.maxDate,
minValue: this.minDate,
vtype: 'daterange',
startDateField: 'startdt'
};

The markup is:

<label id="enddt-labelEl" for="enddt-inputEl" class="dateFieldLabel dateFieldLabel-left" style="width:100px;margin-right:5px;">to:</label>

xun
26 Apr 2012, 8:43 AM
Also tried to change labelWidth, did not work either, because somehow the td cell become 115 px wide. Wonder what kind of math is playing here

<td id="enddt-labelCell" style="" valign="top" halign="left" width="155"><label id="enddt-labelEl" for="enddt-inputEl" class="dateFieldLabel dateFieldLabel-left" style="width:15px;margin-right:5px;">to:</label></td>