Frontend Changes

This commit is contained in:
Utkarsh Khedkar
2026-02-28 11:00:48 +05:30
parent 599023166a
commit c11467068c
6 changed files with 321 additions and 37 deletions

View File

@@ -875,5 +875,29 @@ document.addEventListener("DOMContentLoaded", function () {
});
});
});
document.addEventListener('DOMContentLoaded', function() {
const invoiceDateInput = document.querySelector('input[name="invoice_date"]');
const dueDateInput = document.querySelector('input[name="due_date"]');
if (invoiceDateInput && dueDateInput) {
invoiceDateInput.addEventListener('change', function() {
const selectedDate = new Date(this.value);
if (!isNaN(selectedDate.getTime())) {
// १० दिवस पुढे नेण्यासाठी logic
selectedDate.setDate(selectedDate.getDate() + 10);
// तारीख YYYY-MM-DD format मध्ये करण्यासाठी
const year = selectedDate.getFullYear();
const month = String(selectedDate.getMonth() + 1).padStart(2, '0');
const day = String(selectedDate.getDate()).padStart(2, '0');
dueDateInput.value = `${year}-${month}-${day}`;
}
});
}
});
</script>
@endsection