daterangepicker set maxdate
var date2 = new Date();
date2.setDate(date2.getDate()-1);
console.log(date2);
$('#daterange').daterangepicker({
showDropdowns: false,
format:'MM/DD/YYYY',
maxDate:date2,
autoclose: true,
autoApply:true,
});