Skip to content

Commit 25664b8

Browse files
authored
Add the TabIndex parameter to the input components (#235)
* chore(combobox): add tabindex * chore(dateinput): add the tabindex * chore(datepicker): add the tabindex * chore(datetimepicker): add the tabindex * chore(numerictextbox): add the tabindex * chore(multiselect): add the tabindex * chore(autocomplete): add the tabindex * chore(timepicker): add the tabindex * chore(daterange): add the tabindex
1 parent bac92c3 commit 25664b8

File tree

9 files changed

+65
-0
lines changed

9 files changed

+65
-0
lines changed

components/autocomplete/overview.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ The AutoComplete is a generic component and its type is determined by the type o
8484

8585
* `Width` - the width of the main element. @[template](/_contentTemplates/inputs/inputs-width-template.md#inputs-width-information)
8686

87+
* `TabIndex` - maps to the `tabindex` attribute of the HTML element. You can use it to customize the order in which the inputs in your form focus with the `Tab` key.
88+
8789
* Templates - they allow you to control the rendering of items in the component. See the [Templates]({%slug autocomplete-templates%}) article for more details.
8890

8991
* Validation - see the [Input Validation]({%slug common-features/input-validation%}) article for more details.

components/combobox/overview.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ The ComboBox is a generic component and its type is determined by the type of th
106106

107107
* `Width` - the width of the dropdown and the main element. @[template](/_contentTemplates/inputs/inputs-width-template.md#inputs-width-information)
108108

109+
* `TabIndex` - maps to the `tabindex` attribute of the HTML element. You can use it to customize the order in which the inputs in your form focus with the `Tab` key.
110+
109111
* Templates - they allow you to control the rendering of items in the component. See the [Templates]({%slug components/combobox/templates%}) article for more details.
110112

111113
* Validation - see the [Input Validation]({%slug common-features/input-validation%}) article for more details.

components/dateinput/overview.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,19 @@ The <a href="https://www.telerik.com/blazor-ui/date-input" target="_blank">Blazo
3939
>caption The date input provides the following features:
4040
4141
* `Class` - the CSS class that will be rendered on the `input` element.
42+
4243
* `Enabled` - whether the `input` is enabled.
44+
4345
* `Format` - the date format that the user input must match. Read more in the [Supported Formats]({%slug components/dateinput/supported-formats%}) article.
46+
4447
* `Id` - renders as the `id` attribute on the `<input />` element, so you can attach a `<label for="">` to the input.
48+
4549
* `Value` - get/set the value of the input, can be used for binding.
50+
4651
* `Width` - the width of the `input`. See the [Dimensions]({%slug common-features/dimensions%}) article.
52+
53+
* `TabIndex` - maps to the `tabindex` attribute of the HTML element. You can use it to customize the order in which the inputs in your form focus with the `Tab` key.
54+
4755
* Validation - see the [Input Validation]({%slug common-features/input-validation%}) article.
4856

4957
>caption The behavior of the component will depend on the type of field it is bound to, and this can result in different user experience and values that it will output:

components/datepicker/overview.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,35 @@ The selected date is: @datePickerValue.ToShortDateString()
3838
The Blazor Date Picker component exposes the following features:
3939

4040
* `BottomView` - Defines the bottommost view in the popup calendar to which the user can navigate to. Defaults to `CalendarView.Month`.
41+
4142
* `DisabledDates` - Specifies a list of dates that can not be selected.
43+
4244
* `Class` - The custom CSS class rendered on the wrapping element.
45+
4346
* `PopupClass` - additional CSS class to customize the appearance of the Date Picker's dropdown.
47+
4448
* `Enabled` - Specifies whether typing in the input is allowed.
49+
4550
* `Format` - Specifies the format of the DateInput of the DatePicker. [Read more about supported data formats in Telerik DateInput for Blazor UI]({%slug components/dateinput/supported-formats%}) article.
51+
4652
* `Id` - renders as the `id` attribute on the `<input />` element, so you can attach a `<label for="">` to the input.
53+
4754
* `Min` - The earliest date that the user can select.
55+
4856
* `Max` - The latest date that the user can select.
57+
4958
* `PopupHeight` - Defines the height of the DatePicker's Popup. Defaults to `auto`.
59+
5060
* `PopupWidth` - Defines the width of the DatePicker's Popup. Defaults to `auto`.
61+
5162
* `Value` - The current value of the input. Can be used for binding.
63+
5264
* `View` - Specifies the current view that will be displayed in the popup calendar.
65+
5366
* `Width` - Defines the width of the DatePicker. Defaults to `280px`.
67+
68+
* `TabIndex` - maps to the `tabindex` attribute of the HTML element. You can use it to customize the order in which the inputs in your form focus with the `Tab` key.
69+
5470
* Validation - see the [Input Validation]({%slug common-features/input-validation%}) article.
5571

5672
The date picker is, essentially, a [date input]({%slug components/dateinput/overview%}) and a [calendar]({%slug components/calendar/overview%}) and the properties it exposes are mapped to the corresponding properties of these two components. You can read more about their behavior in the respective components' documentation.

components/daterangepicker/overview.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ The Blazor Date Range Picker component exposes the following features:
6262

6363
* `PopupClass` - additional CSS class to customize the appearance of the Date Range Picker's dropdown.
6464

65+
* `TabIndex` - maps to the `tabindex` attribute of both `input` HTML elements in the component and them both will have the same `tabindex`. You can use it to customize the order in which the inputs in your form focus with the `Tab` key.
66+
6567
* Validation - see the [Input Validation]({%slug common-features/input-validation%}) article.
6668
* To restrict the user from writing dates in the input so that the end is after the start, you must implement a custom data annotation attribute (you can find an example in the article linked above). The DateRangePicker component does not do this out-of-the-box in order to provide smooth user experience - the code cannot know what the user intent is and they might fix the range if they are given the chance, so correcting the input immediately may prevent them from using it comfortably. The component can fully control the user experience in the popup calendar and it ensures there that the range values are valid (start is before the end). If the user chooses an end date before the start, this date becomes the new start and they can choose the end again.
6769

components/datetimepicker/overview.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,25 @@ Selected time: @selectedTime
5151
The DateTimePicker component exposes the following features:
5252

5353
* `Class` - the custom CSS class rendered on the wrapping element.
54+
5455
* `PopupClass` - additional CSS class to customize the appearance of the DateTimePicker's dropdown.
56+
5557
* `Enabled` - Specifies whether typing in the input and opening the dropdown are allowed.
58+
5659
* `Format` - Specifies the format of the DateInput of the DateTimePicker. Read more in the [Supported Formats]({%slug components/dateinput/supported-formats%}) article.
60+
5761
* `Id` - renders as the `id` attribute on the `<input />` element, so you can attach a `<label for="">` to the input.
62+
5863
* `Min` - The earliest date and time that the user can select.
64+
5965
* `Max` - The latest date and time that the user can select.
66+
6067
* `Value` - The current value of the input. Can be used for binding.
68+
6169
* `Width` - Defines the width of the DateTimePicker.
70+
71+
* `TabIndex` - maps to the `tabindex` attribute of the HTML element. You can use it to customize the order in which the inputs in your form focus with the `Tab` key.
72+
6273
* Validation - see the [Input Validation]({%slug common-features/input-validation%}) article.
6374

6475

components/multiselect/overview.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ The MultiSelect is a generic component and its type is determined by the type of
119119

120120
* `Width` - the width of the main element. @[template](/_contentTemplates/inputs/inputs-width-template.md#inputs-width-information)
121121

122+
* `TabIndex` - maps to the `tabindex` attribute of the HTML element. You can use it to customize the order in which the inputs in your form focus with the `Tab` key.
123+
122124
* Templates - they allow you to control the rendering of items in the component. See the [Templates]({%slug multiselect-templates%}) article for more details.
123125

124126
* Validation - see the [Input Validation]({%slug common-features/input-validation%}) article for more details.

components/numerictextbox/overview.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,25 @@ The numeric textbox component is generic, meaning that it takes the type of its
4747
The numeric textbox provides the following features:
4848

4949
* `Arrows` - whether the up/down spinner arrows (buttons) will be shown. Defaults to `true`.
50+
5051
* `Decimals` - how many decimal places will be allowed while the user is typing a new value. Takes effect only while the input is focused.
52+
5153
* `Format` - the format with which the number is presented when the input is not focused. Read more in the [Standard Numeric Format Strings in .NET](https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings) article.
54+
5255
* `Id` - renders as the `id` attribute on the `<input />` element, so you can attach a `<label for="">` to the input.
56+
5357
* `Max` - the maximum decimal value the input can take. Must be of the same type as the `Value`.
58+
5459
* `Min` - the minimum decimal value the input can take. Must be of the same type as the `Value`.
60+
5561
* `Step` - the decimal value of the step with which the value changes when the arrows are used. Must be of the same type as the `Value`.
62+
5663
* `Value` - to get/set the value of the input.
64+
5765
* `Width` - the width of the component. See the [Dimensions]({%slug common-features/dimensions%}) article.
66+
67+
* `TabIndex` - maps to the `tabindex` attribute of the HTML element. You can use it to customize the order in which the inputs in your form focus with the `Tab` key.
68+
5869
* Validation - see the [Input Validation]({%slug common-features/input-validation%}) article.
5970

6071
>caption Example of using a custom format strings

components/timepicker/overview.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,25 @@ Selected time: @selectedTime?.ToLongTimeString()
5252
The Time Picker component exposes the following features:
5353

5454
* `Class` - The custom CSS class rendered on the wrapping element.
55+
5556
* `PopupClass` - additional CSS class to customize the appearance of the Time Picker's dropdown.
57+
5658
* `Enabled` - Specifies whether typing in the input and opening the dropdown are allowed.
59+
5760
* `Format` - Specifies the format of the DateInput of the TimePicker. Read more in the [Supported Formats]({%slug components/dateinput/supported-formats%}) article. Note that format specifiers for non-time portions will only be editable in the input and will not have a representation in the time picker dropdown.
61+
5862
* `Id` - renders as the `id` attribute on the `<input />` element, so you can attach a `<label for="">` to the input.
63+
5964
* `Min` - The earliest time that the user can select.
65+
6066
* `Max` - The latest time that the user can select.
67+
6168
* `Value` - The current value of the input. Can be used for binding.
69+
6270
* `Width` - Defines the width of the TimePicker.
71+
72+
* `TabIndex` - maps to the `tabindex` attribute of the HTML element. You can use it to customize the order in which the inputs in your form focus with the `Tab` key.
73+
6374
* Validation - see the [Input Validation]({%slug common-features/input-validation%}) article.
6475

6576
The `Min` and `Max` properties require a `DateTime` object, but will only use the time portion from it. Thus, the date itself is not important. The hours, minutes, seconds and AM/PM portions control the range of the tumblers in the time picker dropdown. They do not impose validation/limitations on the input editing.

0 commit comments

Comments
 (0)