How do I grab the value of a jquery datepicker within a de-selected row
How do I grab the value of a jquery datepicker within a de-selected row
c-myers1
Posts: 43Questions: 16Answers: 0
It's the 2nd day I've been stuck trying different permutations of this. When a row is de-selected, I need a certain 'fixdate' field blanked out within that row.
Looking at the first example at https://datatables.net/reference/event/deselect, I have:
// dtbl hitherto initialized with the table jquery object
dtbl.row().on( 'deselect', function ( e, dt, type, indexes ) {
if ( type === 'row' ) {
var data = dtbl.rows( indexes ).data().pluck('fixdate').data("kendoDatePicker").value('');
}
});
Nothing I've tried has worked.
This discussion has been closed.
Replies
If you are dealing with just one row then you will want to use
row()
instead of the pluralrows()
.This would be used as both the getter then the setter. You would do something like this:
You can see an example of this here:
http://live.datatables.net/kahuwali/1/edit
Kevin
Thanks but for my case, this would blank out the markup for the kendo date picker. I want to change only it's value not blank out the element itself. So how can this be done?
Well my final working permutation is
var idx = dtbl.row( indexes ).id();
var res = data.replace("row", "datepicker");
$("[idx="+res+"]").data("kendoDatePicker").value('');