I am writing this below. I am able to get the StartDate field value in my case, but I am not able to get EndDate field value. It is coming as undefined. Please help.
model: {
id:
"BusinessAreaDivisionMappingId"
,
fields: {
BusinessAreaDivisionMappingId: { type:
"number"
, editable:
false
, nullable:
false
},
StartDate: {
type:
"date"
,
required:
true
,
validation: {
required:
true
,
dateComparisonValidation:
function
(element) {
debugger;
var
columnIndex = 0;
var
grid = $(
"#bAPLMappingGrid"
).data(
"kendoGrid"
);
for
(columnIndex; columnIndex < grid.columns.length; columnIndex++) {
if
(grid.columns[columnIndex].field ==
"EndDate"
) {
break
;
}
}
var
StartDate =
new
Date($(element).data(
"kendoDatePicker"
).value());
var
EndDate =
new
Date($(element).closest(
"tr"
).find(
"td:eq("
+ columnIndex +
")"
).text());
element.attr(
"data-dateComparisonValidation-msg"
,
"Start Date Cannot be more than End Date"
);
if
(StartDate && EndDate)
return
(StartDate >= EndDate);
return
true
;
}
}
},
EndDate: { type:
"date"
},
IsDeleted: { type:
"boolean"
, editable:
false
, nullable:
true
}
}
}