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

[Solved] Telerik DatePicker with jquery data-link plugin

1 Answer 120 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.
Sam Critchley
Top achievements
Rank 1
Sam Critchley asked on 24 Nov 2010, 03:49 AM
Hello,

When picking a date with the telerik datepicker it doesn't appear to be triggering whatever event the link plugin is expecting to fire. If I make changes directly to the input field the bound object is updated, if I pick a date it is not. Any thoughts?

I believe this is scheduled to become part of jquery at some point so supporting it would be nice.

http://api.jquery.com/category/plugins/data-link/

1 Answer, 1 is accepted

Sort by
0
Sam Critchley
Top achievements
Rank 1
answered on 24 Nov 2010, 04:12 AM
Upon further investigation it appears that just calling val('val') doesn't trigger the change event.

In my telerik.datepicker.js i changed line 426 (on my copy it is at least):
this.$input.val(isNull ? '' : $t.calendar.formatDate(this.selectedDate.toDate(), this.format));
to
this.$input.val(isNull ? '' : $t.calendar.formatDate(this.selectedDate.toDate(), this.format)).change();
I've added the call to change at the end. Is this something that could be changed in the official release?
Tags
Date/Time Pickers
Asked by
Sam Critchley
Top achievements
Rank 1
Answers by
Sam Critchley
Top achievements
Rank 1
Share this question
or