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

Error Tooltip showing up in the picker?

6 Answers 210 Views
Validation
This is a migrated thread and some comments may be shown as answers.
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
sitefinitysteve asked on 28 Jun 2012, 02:46 AM
The input renders out with required, then it gets the datepicker applied, then on click, the validation gets called

...am I doing something wrong with it?

**ignore "datepicker.PNG"** attached by accident, have a look at the other image

6 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 28 Jun 2012, 06:11 AM
Hi Steve,

This is expected behavior, by default the validation message element will be placed directly after the validated input. Thus, when a widget such as ComboBox, DropDownList, DatePicker etc. is used, you should specify where the message to appear by placing a separate span element with data-for attribute set to the validated input name and a class .k-invalid-msg. As shown in this online demo (note the AutoComplete widget) and as described in the documentation under Initialize Kendo Validator with specific tooltip position section.

All the best,
Rosen
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 28 Jun 2012, 09:00 PM
Yeah I saw that...but it doesn't seem to work...I cant replicate in a fiddle, but its clearly gimpy

Have a peek: http://screencast.com/t/3zpskLnS

The markup is exactly as what's in the demo...<input><span>

This is a better video creating it in firebug...
http://screencast.com/t/UARWKBCDtdla
0
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 28 Jun 2012, 09:12 PM
....even better, replicated on a fiddle!

http://jsfiddle.net/stevescotthome/wEjyk/3/
0
Accepted
Rosen
Telerik team
answered on 29 Jun 2012, 05:43 AM
Steve,

As I have already described and as mentioned in the documentation the data-for attribute should be set to the validated input name. However, looking at the provided jsFiddle, the input from which the widget  is created, does not even have a name attribute set.

All the best,
Rosen
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 29 Jun 2012, 01:27 PM
Oh my apologies, I missed it being for->name, I was thinking for->ID

Thanks Rosen
0
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 09 Sep 2012, 07:41 PM
Could we not just update the validation logic so it knows that this is a kendo decorated control and then it can put it's span in the appropriate spot itself?

This is becoming really annoying to use in asp.net with the dynamic names it makes

Steve
Tags
Validation
Asked by
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Answers by
Rosen
Telerik team
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Share this question
or