You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/datetimepicker/events.md
+15-14Lines changed: 15 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -102,33 +102,34 @@ As an argument, the event handler receives a [`DateTimePickerCalendarCellRenderE
102
102
103
103
## OnChange
104
104
105
-
The `OnChange` event represents a user action that confirms the current value. It fires when the user presses `Enter` in the input or when the input loses focus.
105
+
The `OnChange` event represents a user action that confirms the current value. It fires when the user:
106
+
107
+
* Presses `Enter` while the textbox is focused.
108
+
* Clicks **Set** in the date and time selection popup.
109
+
* Blurs the component.
106
110
107
111
The event handler receives an `object` argument that you need to cast to the actual `Value` type. The argument can hold a value or be `null`, depending on the user input and the `Value` type.
108
112
109
113
The DateTimePicker is a generic component, so you must either provide a `Value`, or a type to the `T` parameter of the component.
110
114
111
-
>caption Handle OnChange and use two-way binding
115
+
>caption Handle DateTimePicker OnChange and use two-way Value binding
The `OnChange` event represents a user action - confirmation of the current value. It fires when the user presses `Enter` in the input, or when the input loses focus.
55
+
The `OnChange` event represents a user action that confirms the current value. It fires when the user:
56
56
57
-
The time picker is a generic component, so you must provide either a `Value`, or a type to the `T` parameter of the component.
57
+
* Presses `Enter` while the textbox is focused.
58
+
* Clicks **Set** in the time selection popup.
59
+
* Blurs the component.
58
60
59
-
>caption Handle the TimePicker OnChange event
61
+
The event handler receives an `object` argument that you need to cast to the actual `Value` type. The argument can hold a value or be `null`, depending on the user input and the `Value` type.
60
62
61
-
````RAZOR
62
-
@Result
63
-
<br />
64
-
TimePicker Value: @TimePickerValue
65
-
<br />
63
+
The TimePicker is a generic component, so you must either provide a `Value`, or a type to the `T` parameter of the component.
64
+
65
+
>caption Handle DateTimePicker OnChange and use two-way Value binding
66
66
67
+
````RAZOR
67
68
<TelerikTimePicker @bind-Value="@TimePickerValue"
68
-
OnChange="OnTimePickerChange">
69
+
OnChange="@TimePickerValueChanged"
70
+
Width="150px">
69
71
</TelerikTimePicker>
70
72
71
-
@code {
72
-
private string Result { get; set; } = string.Empty;
73
+
<span><code>OnChange</code> fired at <strong>@LastOnChange?.ToString("HH:mm:ss.fff")</strong></span>
0 commit comments