File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -3,11 +3,13 @@ import classNames from 'classnames';
33import PanelContext from '../PanelContext' ;
44import { GenerateConfig } from '../generate' ;
55import { getLastDay } from '../utils/timeUtil' ;
6+ import { PanelMode } from '../interface' ;
67
78export interface PanelBodyProps < DateType > {
89 prefixCls : string ;
910 disabledDate ?: ( date : DateType ) => boolean ;
1011 onSelect : ( value : DateType ) => void ;
12+ picker ?: PanelMode ;
1113
1214 // By panel
1315 headerCells ?: React . ReactNode ;
@@ -30,6 +32,7 @@ export default function PanelBody<DateType>({
3032 prefixCls,
3133 disabledDate,
3234 onSelect,
35+ picker,
3336 rowNum,
3437 colNum,
3538 prefixColumn,
@@ -75,8 +78,8 @@ export default function PanelBody<DateType>({
7578 title = { title }
7679 className = { classNames ( cellPrefixCls , {
7780 [ `${ cellPrefixCls } -disabled` ] : disabled ,
78- [ `${ cellPrefixCls } -start` ] : getCellText ( currentDate ) === 1 ,
79- [ `${ cellPrefixCls } -end` ] : title === getLastDay ( generateConfig , currentDate ) ,
81+ [ `${ cellPrefixCls } -start` ] : getCellText ( currentDate ) === 1 || picker === 'year' && Number ( title ) % 10 === 0 ,
82+ [ `${ cellPrefixCls } -end` ] : title === getLastDay ( generateConfig , currentDate ) || picker === 'year' && Number ( title ) % 10 === 9 ,
8083 ...getCellClassName ( currentDate ) ,
8184 } ) }
8285 onClick = { ( ) => {
You can’t perform that action at this time.
0 commit comments