mirror of
https://github.com/umami-software/umami.git
synced 2026-02-06 13:47:15 +01:00
Added month select component.
This commit is contained in:
parent
6ef1f2e9f9
commit
c548267d91
16 changed files with 169 additions and 71 deletions
|
|
@ -3,7 +3,7 @@ import { Icon, Modal, Dropdown, Item, Text, Flexbox } from 'react-basics';
|
|||
import { endOfYear, isSameDay } from 'date-fns';
|
||||
import DatePickerForm from 'components/metrics/DatePickerForm';
|
||||
import useLocale from 'hooks/useLocale';
|
||||
import { dateFormat } from 'lib/date';
|
||||
import { formatDate } from 'lib/date';
|
||||
import Icons from 'components/icons';
|
||||
import useMessages from 'hooks/useMessages';
|
||||
|
||||
|
|
@ -135,8 +135,8 @@ const CustomRange = ({ startDate, endDate, onClick }) => {
|
|||
<Icons.Calendar />
|
||||
</Icon>
|
||||
<Text>
|
||||
{dateFormat(startDate, 'd LLL y', locale)}
|
||||
{!isSameDay(startDate, endDate) && ` — ${dateFormat(endDate, 'd LLL y', locale)}`}
|
||||
{formatDate(startDate, 'd LLL y', locale)}
|
||||
{!isSameDay(startDate, endDate) && ` — ${formatDate(endDate, 'd LLL y', locale)}`}
|
||||
</Text>
|
||||
</Flexbox>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue