Start date from week entering fill the other field date

$(‘.section_week’).keyup(function() {
var section_id =$(this).attr(“alt”);
var date = $(‘#start_date_section’+section_id).datepicker(‘getDate’);
if(date !=”Invalid Date”){
var week = $(this).val();
var total = week*7;
Date.prototype.addDays = function(days) {
var date = new Date(this.valueOf());
date.setDate(date.getDate() + days);
return date;
}
var get_date = date.addDays(total);
var final_date = (((get_date.getDate() > 9) ? get_date.getDate() : (‘0’ + get_date.getDate())) + ‘-‘ + ((get_date.getMonth() > 8) ? (get_date.getMonth() + 1) : (‘0’ + (get_date.getMonth() + 1))) + ‘-‘ + get_date.getFullYear());
$(‘#complete_date_section’+section_id).val(final_date);
}else{
alert(“Please Select Start Date First”);
$(‘#no_of_week_section’+section_id).val(”);
}
});