Those approaches don't work:
dateSelectedFrom = $("#datepickerFrom").value - undefined
dateSelectedFrom = $("#datepickerFrom").value() - object has no method value()
I know that I can use this.value()
and it is works fine, but the method onDateSelectedFromCalendar
is used by a different dateTimePicker control (I have several on the page)
<input id="datepickerFrom" value="10/10/2011" />
$("#datepickerFrom").kendoDatePicker({
change: onDateSelectedFromCalendar
});
function onDateSelectedFromCalendar(e) {
dateSelectedFrom = $("#datepickerFrom").value;
}
Documentation doesn't specify any other options http://docs.telerik.com/kendo-ui/api/web/datepicker
With the Kendo object you have to use data
like:
var d = $("#datepickerFrom").data("kendoDateTimePicker").value();
See the documentation here.