File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
src/PickerPanel/DatePanel Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 11import classNames from 'classnames' ;
22import * as React from 'react' ;
3+ import type { PanelMode , SharedPanelProps } from '../../interface' ;
34import {
45 formatValue ,
56 getWeekStartDate ,
67 isSameDate ,
78 isSameMonth ,
89 WEEK_DAY_COUNT ,
910} from '../../utils/dateUtil' ;
10- import type { PanelMode , SharedPanelProps } from '../../interface' ;
1111import { PanelContext , useInfo } from '../context' ;
1212import PanelBody from '../PanelBody' ;
1313import PanelHeader from '../PanelHeader' ;
@@ -171,7 +171,7 @@ export default function DatePanel<DateType extends object = any>(props: DatePane
171171 // ========================= Render =========================
172172 return (
173173 < PanelContext . Provider value = { info } >
174- < div className = { panelPrefixCls } >
174+ < div className = { classNames ( panelPrefixCls , showWeek && ` ${ panelPrefixCls } -show-week` ) } >
175175 { /* Header */ }
176176 < PanelHeader
177177 onOffset = { ( offset ) => {
Original file line number Diff line number Diff line change @@ -1033,6 +1033,9 @@ describe('NewPicker.Range', () => {
10331033 openPicker ( container ) ;
10341034
10351035 expect ( document . querySelector ( '.rc-picker-cell-week' ) ) . toBeTruthy ( ) ;
1036+ expect (
1037+ document . querySelector ( '.rc-picker-date-panel.rc-picker-date-panel-show-week' ) ,
1038+ ) . toBeTruthy ( ) ;
10361039 } ) ;
10371040
10381041 it ( 'focus event' , ( ) => {
You can’t perform that action at this time.
0 commit comments