File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,14 @@ export default () => {
8787 test : [ moment ( ) , moment ( ) . add ( 1 , 'hour' ) ] ,
8888 } }
8989 />
90+ < RangePicker < Moment >
91+ { ...sharedProps }
92+ value = { undefined }
93+ locale = { zhCN }
94+ allowClear
95+ picker = "time"
96+ style = { { width : 280 } }
97+ />
9098 </ div >
9199
92100 < div style = { { margin : '0 8px' } } >
Original file line number Diff line number Diff line change @@ -239,6 +239,7 @@ function InnerRangePicker<DateType>(props: RangePickerProps<DateType>) {
239239 const separatorRef = useRef < HTMLDivElement > ( null ) ;
240240 const startInputRef = useRef < HTMLInputElement > ( null ) ;
241241 const endInputRef = useRef < HTMLInputElement > ( null ) ;
242+ const arrowRef = useRef < HTMLDivElement > ( null ) ;
242243
243244 // ============================ Warning ============================
244245 if ( process . env . NODE_ENV !== 'production' ) {
@@ -892,7 +893,11 @@ function InnerRangePicker<DateType>(props: RangePickerProps<DateType>) {
892893 // Arrow offset
893894 arrowLeft = startInputDivRef . current . offsetWidth + separatorRef . current . offsetWidth ;
894895
895- if ( panelDivRef . current . offsetWidth && arrowLeft > panelDivRef . current . offsetWidth ) {
896+ if (
897+ panelDivRef . current . offsetWidth &&
898+ arrowRef . current . offsetWidth &&
899+ arrowLeft > panelDivRef . current . offsetWidth - arrowRef . current . offsetWidth
900+ ) {
896901 panelLeft = arrowLeft ;
897902 }
898903 }
@@ -1003,7 +1008,7 @@ function InnerRangePicker<DateType>(props: RangePickerProps<DateType>) {
10031008 className = { classNames ( `${ prefixCls } -range-wrapper` , `${ prefixCls } -${ picker } -range-wrapper` ) }
10041009 style = { { minWidth : popupMinWidth } }
10051010 >
1006- < div className = { `${ prefixCls } -range-arrow` } style = { arrowPositionStyle } />
1011+ < div ref = { arrowRef } className = { `${ prefixCls } -range-arrow` } style = { arrowPositionStyle } />
10071012
10081013 { renderPanels ( ) }
10091014 </ div >
You can’t perform that action at this time.
0 commit comments