Auto update one date field to another date field.

Hi ,
While choosing Date of Exit , Due date wants to auto update from Date of Exit plus 30 Days.
Please suggest me how to update due date.

you wan to do it on the fly? or is possible so that field gets updated after your save it?

best regards

I want to do it on fly itself. I want to show plus 30 days in due date field.

take a look at that post, it shows you how to attach a custom javascript file, with this you can manipulate things on the fly. Take a look how is done in the meetings module as a reference

best regards

1 Like

Thanks mikebeck.

I found another solution to update.

			Calendar.setup ({					
				inputField : "date_exit",
				form : "EditView",					
				ifFormat : "%m/%d/%Y %H:%M",
				daFormat : "%m/%d/%Y %H:%M",					
				button : "date_exit_trigger",
				singleClick : true,
				//dateStr : "11/07/2016",
				startWeekday: 0,
				step : 1,
				onUpdate: dateChanged	

	function dateChanged(){
		var exitdate=$('#date_exit').val();			
		var newdate = new Date(exitdate);
		var actualdate = newdate.setDate(newdate.getDate()+30);
		actualdate = new Date(actualdate);
		var duedate = (actualdate.getMonth()+1)+"/"+actualdate.getDate()+"/"+(actualdate.getFullYear());