Please use this date Editor based on jQueryUI datepicker.
var dateEditor = function(ui) {
var $inp = ui.$cell.find("input"),
grid = this;
//initialize the editor
$inp
.datepicker({
changeMonth: true,
changeYear: true,
showAnim: '',
dateFormat: 'mm/dd/yy',
beforeShow: function(input, inst) {
inst.dpDiv.css({
marginTop: -input.offsetHeight + 'px'
});
},
onClose: function(dateText, inst) {
var newRow = {};
newRow[ui.dataIndx] = (inst.selectedMonth + 1) + "/01/" + inst.selectedYear;
grid.updateRow({
rowIndx: ui.rowIndx,
newRow: newRow
})
grid.quitEditMode();
}
});
}
{ title: "Order Date", width: "100", dataIndx: "OrderDate", dataType: 'date', format: 'mm/yy',
editor: {
type: 'textbox',
init: dateEditor
}
},
/*css*/
.ui-datepicker-calendar {
display: none;
}