@@ -991,6 +991,7 @@ export default class Calendar extends Component<CalendarProps, CalendarState> {
991
991
< Month
992
992
{ ...Calendar . defaultProps }
993
993
{ ...this . props }
994
+ containerRef = { this . containerRef }
994
995
ariaLabelPrefix = { this . props . monthAriaLabelPrefix }
995
996
day = { monthDate }
996
997
onDayClick = { this . handleDayClick }
@@ -1123,26 +1124,27 @@ export default class Calendar extends Component<CalendarProps, CalendarState> {
1123
1124
< ClickOutsideWrapper
1124
1125
onClickOutside = { this . handleClickOutside }
1125
1126
style = { { display : "contents" } }
1126
- containerRef = { this . containerRef }
1127
1127
ignoreClass = { this . props . outsideClickIgnoreClass }
1128
1128
>
1129
- < Container
1130
- className = { clsx ( "react-datepicker" , this . props . className , {
1131
- "react-datepicker--time-only" : this . props . showTimeSelectOnly ,
1132
- } ) }
1133
- showTime = { this . props . showTimeSelect || this . props . showTimeInput }
1134
- showTimeSelectOnly = { this . props . showTimeSelectOnly }
1135
- >
1136
- { this . renderAriaLiveRegion ( ) }
1137
- { this . renderPreviousButton ( ) }
1138
- { this . renderNextButton ( ) }
1139
- { this . renderMonths ( ) }
1140
- { this . renderYears ( ) }
1141
- { this . renderTodayButton ( ) }
1142
- { this . renderTimeSection ( ) }
1143
- { this . renderInputTimeSection ( ) }
1144
- { this . renderChildren ( ) }
1145
- </ Container >
1129
+ < div style = { { display : "contents" } } ref = { this . containerRef } >
1130
+ < Container
1131
+ className = { clsx ( "react-datepicker" , this . props . className , {
1132
+ "react-datepicker--time-only" : this . props . showTimeSelectOnly ,
1133
+ } ) }
1134
+ showTime = { this . props . showTimeSelect || this . props . showTimeInput }
1135
+ showTimeSelectOnly = { this . props . showTimeSelectOnly }
1136
+ >
1137
+ { this . renderAriaLiveRegion ( ) }
1138
+ { this . renderPreviousButton ( ) }
1139
+ { this . renderNextButton ( ) }
1140
+ { this . renderMonths ( ) }
1141
+ { this . renderYears ( ) }
1142
+ { this . renderTodayButton ( ) }
1143
+ { this . renderTimeSection ( ) }
1144
+ { this . renderInputTimeSection ( ) }
1145
+ { this . renderChildren ( ) }
1146
+ </ Container >
1147
+ </ div >
1146
1148
</ ClickOutsideWrapper >
1147
1149
) ;
1148
1150
}
0 commit comments