mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 12:47:13 +01:00
parent
2baf4b19fe
commit
547eefae82
4 changed files with 17 additions and 8 deletions
|
|
@ -10,7 +10,7 @@ import { dateFormat } from 'lib/date';
|
|||
import Calendar from 'assets/calendar-alt.svg';
|
||||
import Icon from './Icon';
|
||||
|
||||
const filterOptions = [
|
||||
export const filterOptions = [
|
||||
{ label: <FormattedMessage id="label.today" defaultMessage="Today" />, value: '1day' },
|
||||
{
|
||||
label: (
|
||||
|
|
@ -59,7 +59,7 @@ const filterOptions = [
|
|||
},
|
||||
];
|
||||
|
||||
function DateFilter({ value, startDate, endDate, onChange, className }) {
|
||||
function DateFilter({ value, startDate, endDate, onChange, className, options }) {
|
||||
const [showPicker, setShowPicker] = useState(false);
|
||||
const displayValue =
|
||||
value === 'custom' ? (
|
||||
|
|
@ -86,7 +86,7 @@ function DateFilter({ value, startDate, endDate, onChange, className }) {
|
|||
<DropDown
|
||||
className={className}
|
||||
value={displayValue}
|
||||
options={filterOptions}
|
||||
options={options || filterOptions}
|
||||
onChange={handleChange}
|
||||
/>
|
||||
{showPicker && (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue