How to combine the jQueryUI DatePicker's Icon Trigger with Bootstrap 3's Input Groups

前端 未结 5 755
自闭症患者
自闭症患者 2020-12-19 01:51

jQueryUI has a nice DatePicker with icon trigger (a calendar icon opens the calendar, similar behaviour to Outlook).

On the other hand, Bootstrap 3\'s Input Groups a

5条回答
  •  温柔的废话
    2020-12-19 02:21

    Below block will work with bootstrap 4, providing button trigger(not input focut) Output

    $(function () {
            $("#searchTextDOB").datepicker({
                showOn: "button",            
                buttonImageOnly: false,
                buttonText: ''
            }).next(".ui-datepicker-trigger").addClass("input-group-text btn-light fa fa-calendar-alt").
                wrapAll('

提交回复
热议问题