fix range
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import type { Route } from './+types/route'
|
||||
|
||||
import { DateTime } from 'luxon'
|
||||
import { CalendarIcon, PlusCircleIcon, PlusIcon } from 'lucide-react'
|
||||
import { MeiliSearchFilterBuilder } from 'meilisearch-helper'
|
||||
import { Suspense, useState } from 'react'
|
||||
@@ -226,12 +227,11 @@ function useRangeParams() {
|
||||
}
|
||||
|
||||
const [rangeField, from_] = from.split(':')
|
||||
|
||||
return {
|
||||
rangeField,
|
||||
dateRange: {
|
||||
from: new Date(from_),
|
||||
to: new Date(to)
|
||||
from: DateTime.fromISO(from_).toJSDate(),
|
||||
to: DateTime.fromISO(to).toJSDate()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user