Datepicker default date set to last week
I have a fromDate and a toDate input box both populated using the date picker. For the default Date how can i specify it so it always uses last week starting from Saturday and going to Sunday and not the current date or a fixed date?
defaultDate: '-1w',
i was trying something like this
var date = new Date();
date.setMonth(date.getMonth() + 1, 1);
but for the date not the month, couldn't get it working, anyhelp?
Thank You.