I'm working on a form where the start date field should always end date, and set the values equal if the user changes one. The following JavaScript is what I'm trying to use, but getting an error
NWF$(document).ready(function () {
var calStartDate = NWF$('#' + varStartDate);
var calEndDate = NWF$('#' + varEndDate);
//alert(calStartDate.val());
//alert(calEndDate.val());
calStartDate.change(function () {
calEndDate.val = calStartDate.val;
});
calEndDate.change(function () {
calStartDate.val() = calEndDate.val();
});
});