I need to find out the previous year date from current date and then set as minDate in jQuery UIdatepicker in javascript
My date formaqt is dd-mm-yy
dd-mm-yy
You need to use getFullYear()
and then generate new Date
var d = new Date(2012, 7, 25); d.setFullYear(d.getFullYear() - 1);