or
var
obj = {
Id:
"1"
,
Name:
"foo"
,
Age:
"28"
,
Fire:
"/Date(1348479856993)/"
};
var
objModel = kendo.data.Model.define({
id:
"Id"
,
fields: {
Id: { type:
"number"
},
Name: { type:
"string"
, parse:
function
(e) {
debugger;
return
e;
}
},
Fire: { type:
"date"
},
Age: { type:
"number"
}
}
});
var
obj1 =
new
objModel(obj);
console.log(obj1.get(
"Fire"
));
var
dataSource =
new
kendo.data.DataSource({
data: [ obj ],
schema: {
model: {
id:
"Id"
,
fields: {
Id: { type:
"number"
},
Name: { type:
"string"
, parse:
function
(e) {
debugger;
return
e;
}
},
Fire: { type:
"date"
},
Age: { type:
"number"
}
}
}
}
});
dataSource.read();
var
obj2 = dataSource.at(0);
console.log(obj2.get(
"Fire"
));
/Date(1348479856993)/
Mon Sep 24 2012 11:44:16 GMT+0200 (Romance Daylight Time)
@Html.Kendo().Grid()
<
div
id
=
"grid"
></
div
>
<
script
>
$("#grid").kendoGrid({
columns: [ { title: "Id" },
{ title: "Name" },
{ title: "City" },
{ title: "State" }]
});
</
script
>
<input data-bind="value:cmpnydate" name="date" data-type="date" data-role="datepicker" required="required" validationMessage="required"/>
and binding that datepicker value to "cmpnydate" and it is of "date" type, but that value is not binded to that Schema Variable. Am I defining wrong anywhere? Can u just plz let me know where I have defined wrong?
Thanks and regards,
Bhavani.