vitalets/combodate

Bootstrap?

Opened this issue · 4 comments

How do you apply the form-control class on the combodate? I tried editing the js and the tags but they mess up the layout

wondering the same, any success?

I modified the combodate.js and replaced line 96 with

                tpl = tpl.replace('{'+token+'}', '<div class="col-sm-3"><select class="form-control '+k+' '+customClass+'"></select></div>');

You can use the customClass option. Used as a data attribute it should look likedata-custom-class="form-control".

In addition to @jamesantrobus suggestion, I found the following additional css useful to keep the fields on one line:


.combodate {display:block}
.combodate .form-control {display:inline-block}

Actually, it's just a start — I also added some % width's for the individual form-control fields. But these rules will vary depending on which fields/formats you're using (e.g. when inputting month & year vs month & day & year), so I didn't include them here.