wip: address header and dateRangePicker feedback

This commit is contained in:
silviyaboteva 2020-04-27 14:33:01 +03:00
Родитель 95e5121b49
Коммит 14eb3cd9fd
2 изменённых файлов: 6 добавлений и 16 удалений

Просмотреть файл

@ -4,7 +4,6 @@ import * as React from 'react';
import { ButtonGroup, Button } from '@progress/kendo-react-buttons'; import { ButtonGroup, Button } from '@progress/kendo-react-buttons';
import { DateRangePicker } from '@progress/kendo-react-dateinputs'; import { DateRangePicker } from '@progress/kendo-react-dateinputs';
import { firstDayOfMonth, lastDayOfMonth } from '@progress/kendo-date-math';
import { useLocalization } from '@progress/kendo-react-intl'; import { useLocalization } from '@progress/kendo-react-intl';
import { filterBy } from '@progress/kendo-data-query'; import { filterBy } from '@progress/kendo-data-query';
@ -31,25 +30,15 @@ const Dashboard = () => {
} : null; } : null;
const [range, setRange] = React.useState({ const [range, setRange] = React.useState({
start: new Date('2018-07-01T21:00:00.000Z'), start: new Date('2020-01-01T21:00:00.000Z'),
end: new Date('2018-09-30T21:00:00.000Z') end: new Date('2020-04-29T21:00:00.000Z')
}); });
const onRangeChange = React.useCallback( const onRangeChange = React.useCallback(
(event) => { (event) => {
let rangeStart;
let rangeEnd;
if (event.value.start) {
rangeStart = firstDayOfMonth(event.value.start)
}
if (event.value.end) {
rangeEnd = lastDayOfMonth(event.value.end)
}
setRange({ setRange({
start: rangeStart, start: event.value.start,
end: rangeEnd end: event.value.end
}) })
}, },
[setRange] [setRange]

Просмотреть файл

@ -193,6 +193,7 @@ a {
background-image: url('./../assets/hamburger-icon.svg'); background-image: url('./../assets/hamburger-icon.svg');
background-repeat: no-repeat; background-repeat: no-repeat;
width: 20px; width: 20px;
cursor: pointer;
} }
.title { .title {
@ -208,7 +209,7 @@ a {
width: 40px; width: 40px;
height: 40px; height: 40px;
margin: 0 25px; margin: 0 25px;
border: 1px solid white; box-shadow: 0 0 0px 1px $white;
img { img {
width: 40px; width: 40px;