This commit is contained in:
chamikaJ
2025-04-17 18:28:54 +05:30
parent f583291d8a
commit 8825b0410a
2837 changed files with 241385 additions and 127578 deletions

View File

@@ -0,0 +1,28 @@
import { Calendar } from 'antd';
import React, { useEffect } from 'react';
import type { Dayjs } from 'dayjs';
import { useAppDispatch } from '@/hooks/useAppDispatch';
import { selectedDate } from '../../../features/date/dateSlice';
import { useAppSelector } from '@/hooks/useAppSelector';
/* homepage calendar style override */
import './homeCalendar.css';
import { setHomeTasksConfig } from '@/features/home-page/home-page.slice';
const HomeCalendar = () => {
const dispatch = useAppDispatch();
const { homeTasksConfig } = useAppSelector(state => state.homePageReducer);
const onSelect = (newValue: Dayjs) => {
dispatch(setHomeTasksConfig({ ...homeTasksConfig, selected_date: newValue }));
};
return (
<Calendar
className="home-calendar"
value={homeTasksConfig.selected_date || undefined}
onSelect={onSelect}
/>
);
};
export default HomeCalendar;

View File

@@ -0,0 +1,7 @@
.home-calendar .ant-picker-calendar-date-content {
display: none;
}
.home-calendar .ant-picker-calendar-date-value {
line-height: 44px !important;
}