Hello Team,
I need to automatically set a value of a second date picker based on the value of the first date picker. In this case how can I add 3 months to the value of date1 and show it on date2.
I'm still starting out as a developer any help would be appreciated. Thanks in advance!
JQuery:
function toggleAssigntype() {
var assignTypeVal = $("#TypeOfAssignmentId").data("kendoComboBox").text();
var date1 = $("#MobilizationDate").val(); // value format "mm/dd/yyyy"
var date2 = $("#DemobilizationDate").val();
var addmonths = "03/00/0000";
var addyear = "00/00/0001";
if (assignTypeVal == "RFT") {
//should add 3 months to demobilization date
$("#OtFactor").data("kendoNumericTextBox").enable(false);
$("#DemobilizationDate").data("kendoDatePicker").value(date1+addmonths);
}
else {
$("#OtFactor").data("kendoNumericTextBox").enable(false);
}
};