 <p>try this answer from @J Santosh</p> <p><a href="http://stackoverflow.com/a/32103637/6952155">http://stackoverflow.com/a/32103637/6952155</a></p> <p>this is the fiddle</p> <p><a href="http://jsfiddle.net/SantoshPandu/z2v31Leo/3/" rel="nofollow">http://jsfiddle.net/SantoshPandu/z2v31Leo/3/</a></p> <p>snippet <div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>$(document).ready(function() { var dateStart = new Date(); dateStart.setDate(dateStart.getDate()-1); var dp = document.getElementById("datepicker1"); $("#datepicker1").datepicker( { format: "mm-yyyy", startView: "months", minViewMode: "months", startDate: dateStart, datesDisabled: dp.dataset.datesDisabled.split() }).datepicker("setDate",null); $("#datepicker1").on('changeMonth',function(date){ console.log(date.date.getMonth()+1); }) });</code></pre> <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.6.4/css/bootstrap-datepicker.css"&gt; &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.6.4/js/bootstrap-datepicker.min.js"&gt;&lt;/script&gt; &lt;div class="modal-body"&gt; &lt;div class="input-append date" id="datepicker1" data-date="Aug-2015" data-date-format="mm-yyyy" data-dates-disabled="Sep-2015,Oct-2015" style="display:inline-block; font-weight:bold;"&gt; Check In: &lt;input type="text" readonly="readonly" name="date1" &gt; &lt;span class="add-on"&gt;&lt;i class="glyphicon glyphicon-calendar"&gt;&lt;/i&gt;&lt;/span&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> </div> </div> </p>