File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ export default () => {
3333 < div >
3434 < h1 > Value: { value ? value . format ( 'YYYY-MM-DD HH:mm:ss' ) : 'null' } </ h1 >
3535
36- < div style = { { display : 'flex' } } >
36+ < div style = { { display : 'flex' , flexWrap : 'wrap' } } >
3737 < div style = { { margin : '0 8px' } } >
3838 < h3 > Basic</ h3 >
3939 < Picker < Moment > { ...sharedProps } locale = { zhCN } />
@@ -121,6 +121,10 @@ export default () => {
121121 < h3 > Year</ h3 >
122122 < Picker < Moment > { ...sharedProps } locale = { zhCN } picker = "year" />
123123 </ div >
124+ < div style = { { margin : '0 8px' } } >
125+ < h3 > Keyboard navigation (Tab key) disabled</ h3 >
126+ < Picker < Moment > { ...sharedProps } locale = { enUS } tabIndex = { - 1 } />
127+ </ div >
124128 </ div >
125129 </ div >
126130 ) ;
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ export interface PickerSharedProps<DateType> extends React.AriaAttributes {
4545 allowClear ?: boolean ;
4646 autoFocus ?: boolean ;
4747 disabled ?: boolean ;
48+ tabIndex ?: number ;
4849 open ?: boolean ;
4950 defaultOpen ?: boolean ;
5051 /** Make input readOnly to avoid popup keyboard in mobile */
@@ -129,6 +130,7 @@ function InnerPicker<DateType>(props: PickerProps<DateType>) {
129130 const {
130131 prefixCls = 'rc-picker' ,
131132 id,
133+ tabIndex,
132134 style,
133135 className,
134136 dropdownClassName,
@@ -466,6 +468,7 @@ function InnerPicker<DateType>(props: PickerProps<DateType>) {
466468 < div className = { `${ prefixCls } -input` } ref = { inputDivRef } >
467469 < input
468470 id = { id }
471+ tabIndex = { tabIndex }
469472 disabled = { disabled }
470473 readOnly = { inputReadOnly || ! typing }
471474 value = { text }
You can’t perform that action at this time.
0 commit comments