@@ -120,7 +120,7 @@ function RangeSelector<DateType extends object = any>(
120120 const rtl = direction === 'rtl' ;
121121
122122 // ======================== Prefix ========================
123- const { prefixCls } = React . useContext ( PickerContext ) ;
123+ const { prefixCls, alignedPlacement } = React . useContext ( PickerContext ) ;
124124
125125 // ========================== Id ==========================
126126 const ids = React . useMemo ( ( ) => {
@@ -173,7 +173,7 @@ function RangeSelector<DateType extends object = any>(
173173 } ) ;
174174
175175 // ====================== ActiveBar =======================
176- const realPlacement = getRealPlacement ( placement , rtl ) ;
176+ const realPlacement = getRealPlacement ( alignedPlacement || placement , rtl ) ;
177177 const offsetUnit = getoffsetUnit ( realPlacement , rtl ) ;
178178 const placementRight = realPlacement ?. toLowerCase ( ) . endsWith ( 'right' ) ;
179179 const [ activeBarStyle , setActiveBarStyle ] = React . useState < React . CSSProperties > ( {
@@ -186,7 +186,7 @@ function RangeSelector<DateType extends object = any>(
186186 if ( input ) {
187187 const { offsetWidth, offsetLeft, offsetParent } = input . nativeElement ;
188188 const parentWidth = ( offsetParent as HTMLElement ) ?. offsetWidth || 0 ;
189- const activeOffset = placementRight ? ( parentWidth - offsetWidth - offsetLeft ) : offsetLeft ;
189+ const activeOffset = placementRight ? parentWidth - offsetWidth - offsetLeft : offsetLeft ;
190190 setActiveBarStyle ( ( ori ) => ( {
191191 ...ori ,
192192 width : offsetWidth ,
0 commit comments