mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-18 15:23:38 +01:00
feature(DateFilter): use locale for date ranges
This commit is contained in:
parent
eb1029bfc8
commit
a48c33fcd6
@ -55,6 +55,7 @@ const filterOptions = [
|
||||
];
|
||||
|
||||
function DateFilter({ value, startDate, endDate, onChange, className }) {
|
||||
const [locale] = useLocale();
|
||||
const [showPicker, setShowPicker] = useState(false);
|
||||
const displayValue =
|
||||
value === 'custom' ? (
|
||||
@ -68,7 +69,7 @@ function DateFilter({ value, startDate, endDate, onChange, className }) {
|
||||
setShowPicker(true);
|
||||
return;
|
||||
}
|
||||
onChange(getDateRange(value));
|
||||
onChange(getDateRange(value, locale));
|
||||
}
|
||||
|
||||
function handlePickerChange(value) {
|
||||
|
Loading…
Reference in New Issue
Block a user