@@ -4,6 +4,7 @@ import { RecordConstructorToComp, RecordConstructorToView } from "lowcoder-core"
4
4
import {
5
5
BoolCodeControl ,
6
6
CustomRuleControl ,
7
+ NumberControl ,
7
8
RangeControl ,
8
9
StringControl ,
9
10
} from "../../controls/codeControl" ;
@@ -99,6 +100,7 @@ const commonChildren = {
99
100
childrenInputFieldStyle : styleControl ( ChildrenMultiSelectStyle , 'childrenInputFieldStyle' ) ,
100
101
timeZone : dropdownControl ( timeZoneOptions , Intl . DateTimeFormat ( ) . resolvedOptions ( ) . timeZone ) ,
101
102
pickerMode : dropdownControl ( PickerModeOptions , 'date' ) ,
103
+ tabIndex : NumberControl ,
102
104
} ;
103
105
type CommonChildrenType = RecordConstructorToComp < typeof commonChildren > ;
104
106
@@ -185,6 +187,7 @@ export type DateCompViewProps = Pick<
185
187
disabledTime : ( ) => ReturnType < typeof disabledTime > ;
186
188
suffixIcon : ReactNode ;
187
189
placeholder ?: string | [ string , string ] ;
190
+ tabIndex ?: number ;
188
191
} ;
189
192
190
193
const getFormattedDate = (
@@ -281,6 +284,7 @@ const DatePickerTmpCmp = new UICompBuilder(childrenMap, (props) => {
281
284
onFocus = { ( ) => props . onEvent ( "focus" ) }
282
285
onBlur = { ( ) => props . onEvent ( "blur" ) }
283
286
suffixIcon = { hasIcon ( props . suffixIcon ) && props . suffixIcon }
287
+ tabIndex = { typeof props . tabIndex === 'number' ? props . tabIndex : undefined }
284
288
/>
285
289
) ,
286
290
showValidationWhenEmpty : props . showValidationWhenEmpty ,
@@ -340,6 +344,7 @@ const DatePickerTmpCmp = new UICompBuilder(childrenMap, (props) => {
340
344
< > < Section name = { sectionNames . advanced } >
341
345
{ timeFields ( children , isMobile ) }
342
346
{ children . suffixIcon . propertyView ( { label : trans ( "button.suffixIcon" ) } ) }
347
+ { children . tabIndex . propertyView ( { label : trans ( "prop.tabIndex" ) } ) }
343
348
</ Section > </ >
344
349
) }
345
350
{ ( useContext ( EditorContext ) . editorModeStatus === "logic" || useContext ( EditorContext ) . editorModeStatus === "both" ) && ! isMobile && commonAdvanceSection ( children ) }
@@ -475,7 +480,9 @@ let DateRangeTmpCmp = (function () {
475
480
} }
476
481
onFocus = { ( ) => props . onEvent ( "focus" ) }
477
482
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
+ />
479
486
) ;
480
487
481
488
const startResult = validate ( { ...props , value : props . start } ) ;
@@ -553,6 +560,7 @@ let DateRangeTmpCmp = (function () {
553
560
< > < Section name = { sectionNames . advanced } >
554
561
{ timeFields ( children , isMobile ) }
555
562
{ children . suffixIcon . propertyView ( { label : trans ( "button.suffixIcon" ) } ) }
563
+ { children . tabIndex . propertyView ( { label : trans ( "prop.tabIndex" ) } ) }
556
564
</ Section > </ >
557
565
) }
558
566
{ ( useContext ( EditorContext ) . editorModeStatus === "logic" || useContext ( EditorContext ) . editorModeStatus === "both" ) && commonAdvanceSection ( children ) }
0 commit comments