mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 15:47:13 +01:00
feature(DateFilter): use locale for date ranges
This commit is contained in:
parent
eb1029bfc8
commit
a48c33fcd6
1 changed files with 2 additions and 1 deletions
|
|
@ -55,6 +55,7 @@ const filterOptions = [
|
||||||
];
|
];
|
||||||
|
|
||||||
function DateFilter({ value, startDate, endDate, onChange, className }) {
|
function DateFilter({ value, startDate, endDate, onChange, className }) {
|
||||||
|
const [locale] = useLocale();
|
||||||
const [showPicker, setShowPicker] = useState(false);
|
const [showPicker, setShowPicker] = useState(false);
|
||||||
const displayValue =
|
const displayValue =
|
||||||
value === 'custom' ? (
|
value === 'custom' ? (
|
||||||
|
|
@ -68,7 +69,7 @@ function DateFilter({ value, startDate, endDate, onChange, className }) {
|
||||||
setShowPicker(true);
|
setShowPicker(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
onChange(getDateRange(value));
|
onChange(getDateRange(value, locale));
|
||||||
}
|
}
|
||||||
|
|
||||||
function handlePickerChange(value) {
|
function handlePickerChange(value) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue