0
$('#dp1').datepicker({
    format: 'dd-mm-yyyy',
    endDate: Date.today()
});
amphetamachine
  • 27,620
  • 12
  • 60
  • 72

2 Answers2

0

Maybe you can use numberOfMonths

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

manowar_manowar
  • 1,215
  • 2
  • 16
  • 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});
})