diff --git a/src/pages/CalendarPage/ui/CalendarPage.ui.tsx b/src/pages/CalendarPage/ui/CalendarPage.ui.tsx index 9ca240f..efc1c36 100644 --- a/src/pages/CalendarPage/ui/CalendarPage.ui.tsx +++ b/src/pages/CalendarPage/ui/CalendarPage.ui.tsx @@ -9,12 +9,7 @@ const CalendarPage = () => (
- +
); diff --git a/src/widgets/CalendarWidget/ui/CalendarWidget.ui.tsx b/src/widgets/CalendarWidget/ui/CalendarWidget.ui.tsx index dfe53c3..3ad844d 100644 --- a/src/widgets/CalendarWidget/ui/CalendarWidget.ui.tsx +++ b/src/widgets/CalendarWidget/ui/CalendarWidget.ui.tsx @@ -11,6 +11,8 @@ export type CalendarWidgetProps = { minDate?: Date; value?: Date; locale?: 'en' | 'ru'; + highlightToday?: boolean; + highlightValue?: boolean; }; const CalendarWidget: FC = (props) => ( diff --git a/src/widgets/CalendarWidget/ui/CalendarWidgetContext.tsx b/src/widgets/CalendarWidget/ui/CalendarWidgetContext.tsx index 3d6e163..ae28fad 100644 --- a/src/widgets/CalendarWidget/ui/CalendarWidgetContext.tsx +++ b/src/widgets/CalendarWidget/ui/CalendarWidgetContext.tsx @@ -21,6 +21,8 @@ export const CalendarWidgetProvider: FC = (props) = minDate = new Date(1990, 0, 1), locale = 'ru', value = new Date(), + highlightToday = false, + highlightValue = false, ...restProps } = props; @@ -35,8 +37,10 @@ export const CalendarWidgetProvider: FC = (props) = maxDate, locale, value, + highlightToday, + highlightValue, ...restProps, - }), [maxDate, minDate, targetDate, locale, restProps, value]); + }), [highlightValue, targetDate, minDate, maxDate, locale, value, highlightToday, restProps]); return ( diff --git a/src/widgets/CalendarWidget/ui/components/DateCell/ui/DateCell.ui.tsx b/src/widgets/CalendarWidget/ui/components/DateCell/ui/DateCell.ui.tsx index 3fd2048..7fb829d 100644 --- a/src/widgets/CalendarWidget/ui/components/DateCell/ui/DateCell.ui.tsx +++ b/src/widgets/CalendarWidget/ui/components/DateCell/ui/DateCell.ui.tsx @@ -16,7 +16,12 @@ const DateCell: FC = (props) => { } = props; const format = 'en-En'; - const { targetMonthIndex, value } = useContext(CalendarWidgetContext); + const { + targetMonthIndex, + value, + highlightToday, + highlightValue, + } = useContext(CalendarWidgetContext); const todayDate = new Date(); const dataDate = new Intl.DateTimeFormat(format).format(date); @@ -34,9 +39,9 @@ const DateCell: FC = (props) => {