Is there any way to get touch devices working with the new kendo calendar? Any insight is greatly appreciated.
John
7 Answers, 1 is accepted
Thank you for noticing this, looks like a bug. We already fixed it and the fix will be available with the next internal build and the service pack. As a workaround, you can reattach the touch events after Calendar creation (and similar for the date pickers):
var calendar = $("#calendar").kendoCalendar().data("kendoCalendar");
if (kendo.support.touch) {
var selector = "td:has(.k-link)";
calendar.element
.undelegate(selector, "touchstart touchend")
.delegate(selector, "touchstart touchend", function (e) {
$(this).toggleClass("k-state-hover", e.type == "touchstart");
})
.delegate(selector, "touchend", $.proxy(calendar._click, calendar));
}
I also updated your points for the find.
All the best,
Kamen Bundev
the Telerik team
Sorry about that. It will be easier to handle if I just attach here the patched calendar - now all you need is to load it after the combined scripts and it will fix the issue.
All the best,
Kamen Bundev
the Telerik team
It depends on the type of the input being used to become the date(time)picker. If it is <input type="text" ... /> then things seem to work OK - however - when the user puts focus on the text box, they are presented with the iPad's standard keyboard. That's not the desired result IMO for scenarios where the browser supports the HTML5 date input types.
So if you set the input to be <input type="date" ... /> or <input type="datetime" ... />, then that shows the iPad's date (and time) picker when the user focuses on the text box, which should be expected. However, the value of the textbox does not show and isn't picked up by the iPad's picker, the min/max values don't get applied, and essentially breaks most of the functionality provided by the datepicker.
The lessor of two evils right now is to set <input type="text" .../> and hope that the users click the calendar / clock icons to use the pickers, which are mostly functional (next/prev arrows still don't work on the calendar). It took me several hours of testing between desktop browsers and the iPad to figure out what was going on here, so hopefully this helps somebody else and helps Telerik find a better solution.
This is already fixed and the next internal build will work okay regardless of the input type.
Regards,
Kamen Bundev
the Telerik team
The behavior still isn't quite right. I'm using KendoUI Web 2012.3.1413 complete and I tried it on this page, too:
http://demos.kendoui.com/web/datepicker/index.html
Currently on iOS Safari:
- the Kendo datepicker pops up when the calendar icon is touched.
- the Kendo datepicker doesn't pop up when the form field is touched and entered.
- the iOS alpha keyboard pops up either when the datepicker pops up or the form field is touched and entered - This is bad.
- All the Kendo datepicker features are now working (the prev/next arrows, etc), OK.
- the Kendo datepicker pops up when the calendar icon is touched, but NOT the iOS alpha keyboard (nor the iOS native date picker).
- the Kendo datepicker doesn't pop up when the form field is touched and entered, but the iOS native date picker shoud pop up instead.
-Brian
Thank you for sharing your thoughts. I will put my comments inline:
"the iOS alpha keyboard pops up either when the datepicker pops up or the form field is touched and entered - This is bad."
We will further investigate this behavior and will try to find the best solution for the upcoming official release of Kendo UI.
"the Kendo datepicker pops up when the calendar icon is touched, but NOT the iOS alpha keyboard (nor the iOS native date picker)."
We will decide whether to use this behavior after further investigation.
"the Kendo datepicker doesn't pop up when the form field is touched and entered, but the iOS native date picker shoud pop up instead. "
If you need such functionality I will suggest you use the native <input type=date /> instead of Kendo DatePicker.
Georgi Krustev
the Telerik team