# TimeDurationPicker Events

You can subscribe to the `Open`, `Close`, and `Change` [TimeDurationPicker events](https://www.telerik.com/aspnet-mvc/documentation/api/kendo.mvc.ui.fluent/timedurationpickereventbuilder) 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](https://demos.telerik.com/aspnet-mvc/timedurationpicker/events).

## Handling by Handler Name

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

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

```JS script
    <script>
        function timedurationpicker_open(e) {
            // Handle the open event.
        }

        function timedurationpicker_close(e) {
            // Handle the close event.
        }

        function timedurationpicker_change(e) {
            // Handle the change event.
        }
    </script>
```

## Handling by Template Delegate

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

```Razor HtmlHelper
    @(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

* [Using the TimeDurationPicker Events (Demo)](https://demos.telerik.com/aspnet-mvc/timedurationpicker/events)

## See Also

* [Using the API of the TimeDurationPicker for ASP.NET MVC (Demo)](https://demos.telerik.com/aspnet-mvc/timedurationpicker/api)
* [Configuring the TimeDurationPicker Columns](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/editors/timedurationpicker/columns)
