File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -208,7 +208,7 @@ export default function Popup<DateType extends object = any>(props: PopupProps<D
208
208
) ;
209
209
210
210
if ( range ) {
211
- const placementRight = placement ?. toLowerCase ( ) . endsWith ( 'right' ) ;
211
+ const placementRight = placement ?. toLowerCase ( ) . endsWith ( 'right' ) || rtl ;
212
212
renderNode = (
213
213
< div
214
214
ref = { wrapperRef }
@@ -217,7 +217,7 @@ export default function Popup<DateType extends object = any>(props: PopupProps<D
217
217
< div
218
218
ref = { arrowRef }
219
219
className = { `${ prefixCls } -range-arrow` }
220
- style = { { [ rtl || placementRight ? 'right ' : 'left ' ] : activeOffset } }
220
+ style = { { [ placementRight ? 'insetInlineEnd ' : 'insetInlineStart ' ] : activeOffset } }
221
221
/>
222
222
223
223
{ /* Watch for container size */ }
Original file line number Diff line number Diff line change @@ -170,7 +170,8 @@ function RangeSelector<DateType extends object = any>(
170
170
} ) ;
171
171
172
172
// ====================== ActiveBar =======================
173
- const offsetUnit = rtl ? 'insetInlineEnd' : 'insetInlineStart' ;
173
+ const placementRight = placement ?. toLowerCase ( ) . endsWith ( 'right' ) || rtl ;
174
+ const offsetUnit = placementRight ? 'insetInlineEnd' : 'insetInlineStart' ;
174
175
175
176
const [ activeBarStyle , setActiveBarStyle ] = React . useState < React . CSSProperties > ( {
176
177
position : 'absolute' ,
@@ -188,7 +189,6 @@ function RangeSelector<DateType extends object = any>(
188
189
width : offsetWidth ,
189
190
[ offsetUnit ] : offsetLeft ,
190
191
} ) ) ;
191
- const placementRight = placement ?. toLowerCase ( ) . endsWith ( 'right' ) ;
192
192
onActiveOffset ( placementRight ? ( parentWidth - offsetWidth - offsetLeft ) : offsetLeft ) ;
193
193
}
194
194
} ) ;
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ exports[`Picker.Range onPanelChange is array args should render correctly in pla
89
89
</div >
90
90
<div
91
91
class = " rc-picker-active-bar"
92
- style = " position: absolute; width: 0px; inset-inline-start : 0;"
92
+ style = " position: absolute; width: 0px; inset-inline-end : 0;"
93
93
/>
94
94
</div >
95
95
</div >
@@ -184,7 +184,7 @@ exports[`Picker.Range panelRender 1`] = `
184
184
>
185
185
<div
186
186
class = " rc-picker-range-arrow"
187
- style = " left: 0px ;"
187
+ style = " inset-inline-start: 0 ;"
188
188
/>
189
189
<div
190
190
class = " rc-picker-panel-container rc-picker-date-panel-container"
@@ -250,7 +250,7 @@ exports[`Picker.Range use dateRender and monthCellRender in date range picker 1`
250
250
>
251
251
<div
252
252
class = " rc-picker-range-arrow"
253
- style = " left: 0px ;"
253
+ style = " inset-inline-start: 0 ;"
254
254
/>
255
255
<div
256
256
class = " rc-picker-panel-container rc-picker-date-panel-container"
@@ -1307,7 +1307,7 @@ exports[`Picker.Range use dateRender and monthCellRender in month range picker 1
1307
1307
>
1308
1308
<div
1309
1309
class = " rc-picker-range-arrow"
1310
- style = " left: 0px ;"
1310
+ style = " inset-inline-start: 0 ;"
1311
1311
/>
1312
1312
<div
1313
1313
class = " rc-picker-panel-container rc-picker-month-panel-container"
You can’t perform that action at this time.
0 commit comments