I want to show two months using bootstrap datepicker. After search on google I am not able to find how to show multiple months using bootstrap datepicker. I found that I can
Bootstrap Datepicker conflict with jquery UI datepicker. f you want to use Bootstrap datepicker then try this
var datepicker = $.fn.datepicker.noConflict(); // return $.fn.datepicker to previously assigned value
$.fn.bootstrapDP = datepicker; // give $().bootstrapDP the bootstrap-datepicker functionality
// Call bootstrap datepicker function
$('#datepickermodel').bootstrapDP({
format: 'dd/mm/yyyy',
todayHighlight: true
});
This works for me. I hope this will work for you as well :)
For more details: https://bootstrap-datepicker.readthedocs.io/en/master/#no-conflict-mode
Just put this line after calling Bootstrap datepicker
var _datepicker = jQuery.fn.datepicker;
And after calling jQuery-ui JS
jQuery.fn.datepicker = _datepicker;
So, your call will looks like
<script src="/bootstrap-datepicker.js" type="text/javascript"></script>
var _datepicker = jQuery.fn.datepicker;
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
jQuery.fn.datepicker = _datepicker;