var dateString1=$("input[title='Start Date']").attr('value');
var arrStartDate = dateString1.split("/");
var date=arrStartDate[1]+"/"+arrStartDate[0]+"/"+arrStartDate[2]
var startDate = new Date(Date.parse(date));
alert('start: ' + startDate);
var expDate = startDate;
expDate.setDate(startDate.getDate() + count);
// alert('<br>expire: ' + expDate);
//Month will always return month-1 so add 1 to month
var mm = expDate.getMonth()+1;
var dd = expDate.getDate();
var yyyy = expDate.getFullYear();
var finaldate = dd + '/' + mm + '/' + yyyy;
$("input[title='Due Date']").attr('value',finaldate);
No comments:
Post a Comment