Dependent calendar fields in DA-FormMaker

The following scenario: two calendar fields. If the user selects a date in the first field, the second calendar field should be automatically set to this date.

With the following code the second calendar field can be synchronized with the first one:

$('#Cal1').change(function(){
     $("#Cal2").datepicker("option", "defaultDate", $("#Cal1").datepicker('getDate'))
});

“Cal1” and “Cal2” are the names of the two fields. These must be set accordingly in the code.

Download the example

Leave a Reply

Your email address will not be published. Required fields are marked *