chore: calendar fixes
This commit is contained in:
parent
731be741a1
commit
88f39c166e
|
|
@ -129,9 +129,11 @@ function handleEventClick(event) {
|
||||||
|
|
||||||
function handleDayClick(date) {
|
function handleDayClick(date) {
|
||||||
// Navigate to logs list filtered by the selected date
|
// Navigate to logs list filtered by the selected date
|
||||||
// Format date as YYYY-MM-DD in UTC to match LogsListView filtering
|
// Format date as YYYY-MM-DD using local date components to avoid timezone issues
|
||||||
// Convert to UTC before formatting to avoid timezone off-by-one errors
|
const year = date.getFullYear()
|
||||||
const dateString = new Date(date.getTime() - date.getTimezoneOffset() * 60000).toISOString().split('T')[0]
|
const month = String(date.getMonth() + 1).padStart(2, '0')
|
||||||
|
const day = String(date.getDate()).padStart(2, '0')
|
||||||
|
const dateString = `${year}-${month}-${day}`
|
||||||
router.push({ path: '/logs', query: { date: dateString } })
|
router.push({ path: '/logs', query: { date: dateString } })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -73,9 +73,9 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-show="selectedDate && filteredLogs.length === 0" class="empty-state">
|
<div v-show="selectedDate && filteredLogs.length === 0" class="empty-state">
|
||||||
<p>No logs found for {{ formatDateFilter(selectedDate) }}.</p>
|
<p>{{ t('logs.no-logs-to-display') }} {{ formatDateFilter(selectedDate) }}.</p>
|
||||||
<button @click="clearDateFilter" class="button neutral">
|
<button @click="clearDateFilter" class="button neutral">
|
||||||
Clear date filter
|
{{ t('logs.clear-date-filter') }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue