diff --git a/devui/datepicker/components/calendar/components/panel/index.css b/devui/datepicker/components/calendar/components/panel/index.css new file mode 100644 index 0000000000000000000000000000000000000000..632c28233a512fab565ceae6ec58cea07312c12d --- /dev/null +++ b/devui/datepicker/components/calendar/components/panel/index.css @@ -0,0 +1,74 @@ + +.calendar-panel { + padding: 5px; + width: 300px; + box-sizing: border-box; +} + +.calendar-panel-row { + display: flex; + flex-direction: row; + justify-content: space-between; + height: 32px; +} + +.calendar-panel-cell { + width: 100%; + text-align: center; + flex-grow: 1; + flex-shrink: 1; + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; +} + +.calendar-panel-body .calendar-panel-cell:hover { + background-color: #eeeeee; + color: #000000; +} + +.calendar-panel-cell.selected { + background-color: #0066cc; + color: #ffffff; + border-radius: 6px; +} + +.calendar-panel-cell.selected:hover { + background-color: #0066cc; + color: #ffffff; +} + +.calendar-panel-cell.innerday { + background-color: #f1f1f1; +} + +.calendar-panel-cell.disabled { + background-color: #ffffff; + color: #bbbbbb; +} + +.calendar-head-cell-text, +.calendar-panel-cell-text { + font-weight: normal; + font-style: normal; + font-size: 16px; + text-align: center; +} + +.calendar-panel-header { + height: 32px; + cursor: default; + padding: 0; + margin: 0; + list-style: none; +} + +.calendar-panel-body { + display: flex; + flex-direction: column; + cursor: pointer; + padding: 0; + margin: 0; + list-style: none; +} diff --git a/devui/datepicker/components/calendar/components/panel/index.tsx b/devui/datepicker/components/calendar/components/panel/index.tsx new file mode 100644 index 0000000000000000000000000000000000000000..84892677db0d3cad43c05d962fc33418bc1aaafe --- /dev/null +++ b/devui/datepicker/components/calendar/components/panel/index.tsx @@ -0,0 +1,40 @@ +import { TDatePanelProps } from '../../types' +import { getMonthWeeklyDays, WEEK_DAYS } from '../../utils' +import { handleDateEnter, cellClassName, trigEvent } from '../../helper' +import Toolbar from '../toolbar' +import './index.css' + +const CalendarDatePanel = (props: TDatePanelProps) => { + return ( +