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
To avoid the Date object (if that is what OP wishes):
var currDate = '25-07-2012'; var dateParts = currDate.split('-'); dateParts[2] = parseInt(dateParts[2], 10) - 1; alert(dateParts.join('-'));