diff --git a/public/app.js b/public/app.js index 59e93be..e528212 100644 --- a/public/app.js +++ b/public/app.js @@ -29,7 +29,7 @@ document.addEventListener('DOMContentLoaded', function() { const password = document.getElementById('password').value; // Simple authentication check (replace with your own logic) - if (username === 'admin' && password === 'password') { + if (username === 'fredrik' && password === 'apa') { sessionStorage.setItem('loggedIn', 'true'); loginContainer.style.display = 'none'; appContainer.style.display = 'block'; @@ -69,4 +69,17 @@ document.addEventListener('DOMContentLoaded', function() { document.getElementById('responseMessage').textContent = "Error saving task!"; }); }); + + // Set tomorrow's date as the default for the date input + const today = new Date(); + const tomorrow = new Date(today); + tomorrow.setDate(today.getDate() + 1); + const tomorrowString = tomorrow.toISOString().split('T')[0]; + document.getElementById('scheduled').value = tomorrowString; + + // Initialize flatpickr with Swedish locale and Monday as the first day of the week + flatpickr("#scheduled", { + weekNumbers: true, // Show week numbers + firstDayOfWeek: 1 // Start weeks on Monday + }); });