AnsweredAssumed Answered

Set Start Date equal to End Date

Question asked by jwstl on Aug 30, 2017
Latest reply on Aug 31, 2017 by emha

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();
});

});

 

Outcomes