diff --git a/index.html b/index.html
index 9e85926..1ce0ea1 100644
--- a/index.html
+++ b/index.html
@@ -503,6 +503,7 @@
New task
+
diff --git a/js/app.js b/js/app.js
index 38a20f7..1600040 100644
--- a/js/app.js
+++ b/js/app.js
@@ -1271,6 +1271,28 @@ pasteInput.addEventListener('input', () => {
downloadBtn.addEventListener('click', () => {
downloadData();
});
+main
+// Reference our elements
+const taskDateInput = document.getElementById('new-task-date');
+const confirmDeadlineBtn = document.getElementById('confirm-deadline-btn');
+
+// Show the "Confirm Date" button when a user changes/picks a date
+taskDateInput.addEventListener('input', () => {
+ if (taskDateInput.value) {
+ confirmDeadlineBtn.style.display = 'inline-block';
+ } else {
+ confirmDeadlineBtn.style.display = 'none';
+ }
+});
+
+// Logic when the confirmation button is clicked
+confirmDeadlineBtn.addEventListener('click', () => {
+ alert(`Deadline confirmed: ${taskDateInput.value}`);
+ // Hide the button again after confirmation
+ confirmDeadlineBtn.style.display = 'none';
+});
+
+
const fileInput = document.getElementById('file-input');
const dropZone = document.getElementById('drop-zone');
@@ -1387,4 +1409,5 @@ if (calendarDownloadBtn) {
calendarDownloadBtn.addEventListener('click', () => {
downloadCalendar();
});
-}
\ No newline at end of file
+}
+ main