@@ -10,7 +10,7 @@ import type {
1010 OnOpenChange ,
1111 OpenConfig ,
1212 PanelMode ,
13- PickerRef ,
13+ RangePickerRef ,
1414 RangeTimeProps ,
1515 SelectorProps ,
1616 SharedHTMLAttrs ,
@@ -26,7 +26,7 @@ import useCellRender from './hooks/useCellRender';
2626import useFieldsInvalidate from './hooks/useFieldsInvalidate' ;
2727import useFilledProps from './hooks/useFilledProps' ;
2828import useOpen from './hooks/useOpen' ;
29- import { usePickerRef } from './hooks/usePickerRef' ;
29+ import usePickerRef from './hooks/usePickerRef' ;
3030import usePresets from './hooks/usePresets' ;
3131import useRangeActive from './hooks/useRangeActive' ;
3232import useRangeDisabledDate from './hooks/useRangeDisabledDate' ;
@@ -136,7 +136,7 @@ function getActiveRange(activeIndex: number) {
136136
137137function RangePicker < DateType extends object = any > (
138138 props : RangePickerProps < DateType > ,
139- ref : React . Ref < PickerRef > ,
139+ ref : React . Ref < RangePickerRef > ,
140140) {
141141 // ========================= Prop =========================
142142 const [ filledProps , internalPicker , complexPicker , formatList , maskFormat , isInvalidateDate ] =
@@ -412,7 +412,7 @@ function RangePicker<DateType extends object = any>(
412412 if ( nextIndex === null ) {
413413 triggerOpen ( false , { force : true } ) ;
414414 } else if ( ! skipFocus ) {
415- selectorRef . current . focus ( nextIndex ) ;
415+ selectorRef . current . focus ( { index : nextIndex } ) ;
416416 }
417417 } ;
418418
@@ -422,7 +422,7 @@ function RangePicker<DateType extends object = any>(
422422 // Click to focus the enabled input
423423 const enabledIndex = disabled . findIndex ( ( d ) => ! d ) ;
424424 if ( enabledIndex >= 0 ) {
425- selectorRef . current . focus ( enabledIndex ) ;
425+ selectorRef . current . focus ( { index : enabledIndex } ) ;
426426 }
427427 }
428428
@@ -754,7 +754,7 @@ function RangePicker<DateType extends object = any>(
754754}
755755
756756const RefRangePicker = React . forwardRef ( RangePicker ) as < DateType extends object = any > (
757- props : RangePickerProps < DateType > & React . RefAttributes < PickerRef > ,
757+ props : RangePickerProps < DateType > & React . RefAttributes < RangePickerRef > ,
758758) => React . ReactElement ;
759759
760760if ( process . env . NODE_ENV !== 'production' ) {
0 commit comments