0
$('#dp1').datepicker({
    format: 'dd-mm-yyyy',
    endDate: Date.today()
});
amphetamachine
  • 25,180
  • 10
  • 57
  • 71

2 Answers2

0

Maybe you can use numberOfMonths

or you can read http://jqueryui.com/datepicker/#date-range

manowar_manowar
  • 1,198
  • 2
  • 15
  • 32
0

The Idea behind to disable future dates from current month is, to get current month dates and set it as end date.

$(function(){
var today = new Date();
var lastDate = new Date(today.getFullYear(), today.getMonth() + 1, 0); 
$('.datepicker').datepicker({format: 'mm/dd/yyyy',  startDate : new Date(), autoclose: true,endDate: lastDate});
})