Feed: cap date range inputs at today to prevent selecting future dates
This commit is contained in:
@@ -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]"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user