I have a datepicker and here i highlight selected period.But i have some issue here,that is This is January 2017 But when i select some period of february then It's correctly highlighted in february but Default it shows current month int datepicker that is January.
Code
$("#daterangepicker1").datepicker({
inline: true,
beforeShowDay: function(date) {
var theday = (date.getMonth() + 1) + '/' +
date.getDate() + '/' +
date.getFullYear();
return [true, $.inArray(theday, dtrange) >= 0 ? "hightlight" : ''];
}
});