New to Telerik UI for ASP.NET Core? Start a free 30-day trial

Floating Label

Updated over 6 months ago

A floating label is a placeholder text for form or input fields, which floats above that field and remains visible once the user starts interacting with that field.

To implement a floating label in the Telerik UI TimePicker for ASP.NET Core, define it either as a string or from a function handler.

The following example demonstrates how to set the floating label as a string:

Razor
 @(Html.Kendo().TimePicker() .Name("timepicker") .Label(label => { label.Content("Set alarm for:"); label.Floating(true); }) .HtmlAttributes(new { style = "width: 100%", title = "timepicker" }) )

The following example demonstrates how to set the floating label from a function handler:

Razor
 @(Html.Kendo().TimePicker() .Name("timepicker") .Label(label => { label.ContentHandler("contentHandler"); label.Floating(true); }) .HtmlAttributes(new { style = "width: 100%", title = "timepicker" }) ) <script> function contentHandler(){ return "Set alarm for:"; } </script>

See Also

In this article
See Also
Not finding the help you need?
Contact Support