File tree Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,8 @@ export default function PopupPanel<DateType extends object = any>(
6161 } ,
6262 } ;
6363
64+ const hideHeader = picker === 'time' ;
65+
6466 // ====================== Limitation ======================
6567 const needLimit = React . useCallback (
6668 ( currentPickerValue : DateType ) => {
@@ -96,6 +98,7 @@ export default function PopupPanel<DateType extends object = any>(
9698 ...props ,
9799 hoverValue : null ,
98100 hoverRangeValue : null ,
101+ hideHeader,
99102 } ;
100103
101104 if ( range ) {
Original file line number Diff line number Diff line change @@ -104,3 +104,7 @@ export interface PickerHackContextProps {
104104 * Internal usage for RangePicker to not to show the operation arrow
105105 */
106106export const PickerHackContext = React . createContext < PickerHackContextProps > ( { } ) ;
107+
108+ if ( process . env . NODE_ENV !== 'production' ) {
109+ PickerHackContext . displayName = 'PickerHackContext' ;
110+ }
Original file line number Diff line number Diff line change @@ -605,7 +605,10 @@ describe('Picker.Basic', () => {
605605 it ( 'time should display now' , ( ) => {
606606 const onCalendarChange = jest . fn ( ) ;
607607 const { container } = render ( < DayPicker onCalendarChange = { onCalendarChange } picker = "time" /> ) ;
608+
608609 openPicker ( container ) ;
610+ expect ( document . querySelector ( '.rc-picker-header' ) ) . toBeFalsy ( ) ;
611+
609612 fireEvent . click ( document . querySelector ( '.rc-picker-now > a' ) ) ;
610613
611614 expect (
You can’t perform that action at this time.
0 commit comments