Reputation: 1115
i'm trying the following code but it keeps giving me syntax errror under dateformat... how can i fix this? i just need to change the format of the date
var date = new Date();
var currentMonth = date.getMonth();
var currentDate = date.getDate();
var currentYear = date.getFullYear();
$('#datepicker1').datepicker({
minDate: new Date(currentYear, currentMonth, currentDate)
dateFormat:"yyyymmdd"
});
Upvotes: 0
Views: 53
Reputation: 184
use date.js to get today, yesterday and tomorrow etc dates. it is more flexible to add dates.http://www.datejs.com/
Upvotes: 0
Reputation: 207861
You're missing a comma at the end of:
minDate: new Date(currentYear, currentMonth, currentDate),
^ missing
Upvotes: 2