This is a migrated thread and some comments may be shown as answers.

[Solved] onblur function not being called

2 Answers 108 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Nim
Top achievements
Rank 1
Nim asked on 11 Apr 2011, 08:18 PM
Hello,

When testing the following code:

<%= Html.Telerik().DateTimePicker()
               .Name(testing")
               .Value(model.datetime)
               .Interval(15)
               .Format("yyyy-MMM-d hh:mm tt").HtmlAttributes(new {style="width:180px", onblur = "alert('a');"})%>

I notice the onblur function is not called at all.  Am I missing something?

Many thanks.

2 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 12 Apr 2011, 06:30 AM
Hi Nim,

 The DateTimePicker does not  support the onblur attribute. If you inspect the generated HTML output you would see that it is not rendered at the expected place. Try with InputHtmlAttributes instead:

<%= Html.Telerik().DateTimePicker()
     .Name(testing")
     .Value(model.datetime)
     .Interval(15)
     .Format("yyyy-MMM-d hh:mm tt")
     .HtmlAttributes(new { style="width:180px" })
     .InputHtmlAttributes(new { onblur="alert('a')" })
%>

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Nim
Top achievements
Rank 1
answered on 12 Apr 2011, 03:34 PM
This address my issue.  Thank you.
Tags
Date/Time Pickers
Asked by
Nim
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Nim
Top achievements
Rank 1
Share this question
or