New to Telerik UI for ASP.NET CoreStart a free 30-day trial

TimeDurationPicker Events

You can subscribe to the Open, Close, and Change TimeDurationPicker events and further customize the functionality of the component.

For a complete example on basic TimeDurationPicker events, refer to the demo on using the events of the TimeDurationPicker.

Handling by Handler Name

The following example demonstrates how to subscribe to events by a handler name.

Razor
    @(Html.Kendo().TimeDurationPicker()
        .Name("timeDurationPicker")
        .Columns(c =>
        {
            c.Hours().Format("## hours ");
            c.Minutes().Format(" ## minutes");
        })
        .Events(e => e.Open("onOpen").Close("onClose").Change("onChange"))
    )

Handling by Template Delegate

The following example demonstrates how to subscribe to events by a template delegate.

Razor
    @(Html.Kendo().TimeDurationPicker()
          .Name("timedurationpicker")
          .Events(e => e
              .Open(@<text>
                function(e) {
                    // Handle the open event inline.
                }
              </text>)
			  .Close(@<text>
                function(e) {
                    // Handle the close event inline.
                }
              </text>)
              .Change(@<text>
                function(e) {
                    // Handle the change event inline.
                }
                </text>)
          )
    )

Next Steps

See Also