Files
org-todo-pwa/public/index.html

44 lines
1.5 KiB
HTML

<!DOCTYPE html>
<html lang="sv-SE">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Task Input App</title>
<link rel="stylesheet" href="style.css">
<!-- Flatpickr for dates -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css">
<script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>
</head>
<body>
<div class="container">
<h1>TODO</h1>
<form id="taskForm">
<label for="subject">Uppgift:</label>
<input type="text" id="subject" required><br><br>
<label for="description">Beskrivning:</label>
<textarea id="description"></textarea><br><br>
<label for="scheduled">Datum:</label>
<input type="date" id="scheduled" lang="sv-SE" required><br><br>
<button type="submit">Spara</button>
</form>
<p id="responseMessage"></p>
</div>
<script src="app.js"></script>
<script>
// Set today's date as the default for the date input
const today = new Date().toISOString().split('T')[0];
document.getElementById('scheduled').value = today;
// Initialize flatpickr with Swedish locale and Monday as the first day of the week
flatpickr("#scheduled", {
locale: "sv", // Set Swedish locale
weekNumbers: true, // Show week numbers
firstDayOfWeek: 1 // Start weeks on Monday
});
</script>
</body>
</html>