diff --git a/script.js b/script.js index 62f5eb5..5d62f1e 100644 --- a/script.js +++ b/script.js @@ -120,8 +120,9 @@ function updateTodo(index) { // Clear the input fields inputNameElement.value = ''; - inputDateElement.value = ''; - inputTimeElement.value = ''; + + // Set default date and time + setDefaultDateTime(); // Change the update button back to an add button const addButton = document.querySelector('.js-add-button');