How does one get the caller (sender) of the kendoui datepicker widget? Or any widget for that matter.
<input id="datepicker1" class="datepicker" value="10/10/2011" />
$(document).ready(function () {
// ready
$(".datepicker").kendoDatePicker({
change: onchange
});
});
function onchange(e) {
$(this).hide();
}
Here is a fiddle: http://jsfiddle.net/bryanb/zz48F/
The sender is available as this.element
. It will be a jQuery object:
$(function () {
function onchange(e) {
alert(this.element.prop("id"));
}
$(".datepicker").kendoDatePicker({
change: onchange
});
});
http://jsfiddle.net/zz48F/3/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With