Referencing a Bootstrap icon within jQuery datepicker buttonImage attribute? -
what value should using jquery datepicker buttonimage
attribute?
i utilize bootstrap calendar icon jquery datepicker. can utilize icon image in html page when referenced this:
<i class=icon-calendar></i>
when utilize angular-ui wrapper ui-date
wrap jquery datepicker:
<div class="control-group"> <label class="control-label" for="startdate">start date</label> <div class="controls"> <input class="span2" id="startdate" type="text" data-ng-model="formmodel.startdate" data-ui-date="formmodel.datepickeroptions" data-ng-change="formmodel.setadjustmentdate()" required > </div> </div>
with controller defining datepicker options as:
formmodel.datepickeroptions = { dateformat: 'yy-m-dd' ,changemonth: true ,changeyear: true ,buttonimage: '<i class=icon-calendar></i>' ,buttonimageonly: true ,showon: "button" };
what value should inserting buttonimage?
the datepicker expecting image url { buttonimage: "/images/datepicker.gif" }
.
for doing, rather messing buttonimage attribute, recommend set icon markup buttontext value
.value('ui.config', { date: { dateformat : 'mm-dd-yy', mindate : '+1d', showon : 'button', buttontext : '<i class="icon-calendar"></i>' } })
twitter-bootstrap icons angularjs jquery-ui-datepicker angular-ui
No comments:
Post a Comment