Formatting issue with form-horizontal class on form.

I am using form-horizontal class on my form, and when I need to use 
this markup or else the form field spacing would be off.

&lt;div class="control-group input-append "&gt;
     &lt;label class="control-label required" for="field"&gt;Field&lt;/label&gt;
     &lt;div class="controls date"&gt;
          &lt;input type="text" id="field" name="field" value="" data-format="MM/dd/yyyy HH:mm:ss PP"&gt;&lt;/input&gt;
          &lt;span class="add-on"&gt; &lt;i data-time-icon="icon-time" data-date-icon="icon-calendar"&gt;&lt;/i&gt;&lt;/span&gt;
     &lt;/div&gt;
&lt;/div&gt;

Unfortunately, this broke the datetimepicker plugin. I fixed the code on line 50
to look not only at current element, but parent element for input-append or input-prepend.