@@ -4,6 +4,7 @@ import { RecordConstructorToComp, RecordConstructorToView } from "lowcoder-core"
44import {
55 BoolCodeControl ,
66 CustomRuleControl ,
7+ NumberControl ,
78 RangeControl ,
89 StringControl ,
910} from "../../controls/codeControl" ;
@@ -99,6 +100,7 @@ const commonChildren = {
99100 childrenInputFieldStyle : styleControl ( ChildrenMultiSelectStyle , 'childrenInputFieldStyle' ) ,
100101 timeZone : dropdownControl ( timeZoneOptions , Intl . DateTimeFormat ( ) . resolvedOptions ( ) . timeZone ) ,
101102 pickerMode : dropdownControl ( PickerModeOptions , 'date' ) ,
103+ tabIndex : NumberControl ,
102104} ;
103105type CommonChildrenType = RecordConstructorToComp < typeof commonChildren > ;
104106
@@ -185,6 +187,7 @@ export type DateCompViewProps = Pick<
185187 disabledTime : ( ) => ReturnType < typeof disabledTime > ;
186188 suffixIcon : ReactNode ;
187189 placeholder ?: string | [ string , string ] ;
190+ tabIndex ?: number ;
188191} ;
189192
190193const getFormattedDate = (
@@ -281,6 +284,7 @@ const DatePickerTmpCmp = new UICompBuilder(childrenMap, (props) => {
281284 onFocus = { ( ) => props . onEvent ( "focus" ) }
282285 onBlur = { ( ) => props . onEvent ( "blur" ) }
283286 suffixIcon = { hasIcon ( props . suffixIcon ) && props . suffixIcon }
287+ tabIndex = { typeof props . tabIndex === 'number' ? props . tabIndex : undefined }
284288 />
285289 ) ,
286290 showValidationWhenEmpty : props . showValidationWhenEmpty ,
@@ -340,6 +344,7 @@ const DatePickerTmpCmp = new UICompBuilder(childrenMap, (props) => {
340344 < > < Section name = { sectionNames . advanced } >
341345 { timeFields ( children , isMobile ) }
342346 { children . suffixIcon . propertyView ( { label : trans ( "button.suffixIcon" ) } ) }
347+ { children . tabIndex . propertyView ( { label : trans ( "prop.tabIndex" ) } ) }
343348 </ Section > </ >
344349 ) }
345350 { ( useContext ( EditorContext ) . editorModeStatus === "logic" || useContext ( EditorContext ) . editorModeStatus === "both" ) && ! isMobile && commonAdvanceSection ( children ) }
@@ -475,7 +480,9 @@ let DateRangeTmpCmp = (function () {
475480 } }
476481 onFocus = { ( ) => props . onEvent ( "focus" ) }
477482 onBlur = { ( ) => props . onEvent ( "blur" ) }
478- suffixIcon = { hasIcon ( props . suffixIcon ) && props . suffixIcon } />
483+ suffixIcon = { hasIcon ( props . suffixIcon ) && props . suffixIcon }
484+ tabIndex = { typeof props . tabIndex === 'number' ? props . tabIndex : undefined }
485+ />
479486 ) ;
480487
481488 const startResult = validate ( { ...props , value : props . start } ) ;
@@ -553,6 +560,7 @@ let DateRangeTmpCmp = (function () {
553560 < > < Section name = { sectionNames . advanced } >
554561 { timeFields ( children , isMobile ) }
555562 { children . suffixIcon . propertyView ( { label : trans ( "button.suffixIcon" ) } ) }
563+ { children . tabIndex . propertyView ( { label : trans ( "prop.tabIndex" ) } ) }
556564 </ Section > </ >
557565 ) }
558566 { ( useContext ( EditorContext ) . editorModeStatus === "logic" || useContext ( EditorContext ) . editorModeStatus === "both" ) && commonAdvanceSection ( children ) }
0 commit comments