The code below is the function of the jquery
$(function() {
$(".firstcal").datepicker({
dateFormat: "dd/mm/yy",
onSelect: function(dateText, instance) {
date = $.datepicker.parseDate(instance.settings.dateFormat, dateText, instance.settings);
date.setMonth(date.getMonth() + 6);
$(".secondcal").datepicker("setDate", date);
}
});
$(".secondcal").datepicker({
dateFormat: "dd/mm/yy"
}).attr("disabled", 'disabled');
});
What i am trying to do is that when user choose 1 date from the first datepicker, it will update(+6 month) on 2nd datepicker , but unable to change the date anymore.(only first datepicker able to change) and i need to insert it to database , is that possible? as disabled it won't let me add to database
here the link: http://jsfiddle.net/vpfk6dce/