0

Though same question exists here with similar answers, but none worked for me. Is there any other options to disable the future dates in jquery datepicker?

My code is:

$("#dob").datetimepicker({          
format: "dd-mm-yyyy",           
showMeridian: true,
autoclose: true,
minView: 2
});

I have tried using:

 maxDate: new Date
 maxDate: new Date()

or

 maxDate: 0

But none seems to work for me. I have been using the following version & files:

 jQuery JavaScript Library v2.1.4
 bootstrap-datetimepicker.min.js

What seems to be the problem here?

junkfoodjunkie
  • 3,168
  • 1
  • 19
  • 33
Amir Bhandari
  • 117
  • 1
  • 14

1 Answers1

1

Here is example

http://api.jqueryui.com/datepicker/#option-maxDate

Try it

maxDate: '0d'
venoel
  • 463
  • 3
  • 13