Feed: cap date range inputs at today to prevent selecting future dates

This commit is contained in:
Davide Scaini
2026-05-15 08:38:58 +02:00
parent 15e9969ca2
commit afbcaa5011
+3
View File
@@ -44,6 +44,7 @@
let dateTo = '';
let customFrom = '';
let customTo = '';
const today = new Date().toISOString().slice(0, 10);
let query = '';
let shown = PAGE_SIZE;
let loading = true;
@@ -236,6 +237,7 @@
<input
type="date"
bind:value={customFrom}
max={today}
on:change={() => { datePre = 'all'; }}
class="bg-transparent text-white text-sm focus:outline-none [color-scheme:dark]"
/>
@@ -245,6 +247,7 @@
<input
type="date"
bind:value={customTo}
max={today}
on:change={() => { datePre = 'all'; }}
class="bg-transparent text-white text-sm focus:outline-none [color-scheme:dark]"
/>