const maxDate = new Date(startDate.getTime());
maxDate.setDate(
maxDate.getDate() + totalIssueLength
maxDate.getDate() + totalIssueLength + parseInt(trailDays)
);
// Update the maxDate option of the flatpickr instance
-