showing results for - "on change datepicker and change date increase date in another fuilds"
Constanza
27 Sep 2017
1$('#datepicker2').datepicker({
2	format: 'dd-mm-yyyy',
3	startDate: '0d',
4	autoclose: true,
5}).on('changeDate', function (selected) {
6	var startDate = new Date(selected.date.valueOf());
7	var month = Number($("#con_months_of_contract").val());
8	$('#datepicker4').datepicker('setStartDate', startDate);
9	//set -1 date
10	startDate.setDate(startDate.getDate() - 1);
11	//select months set new date
12  	startDate.setMonth(startDate.getMonth() + month);
13	$("#datepicker4").datepicker("setDate", startDate);
14}).on('clearDate', function (selected) {
15	$('#datepicker4').datepicker('setStartDate', null);
16});
17//@sujay