5
« on: March 31, 2014, 01:39:08 pm »
var colM = [
{ title: "Date", width: 150, dataType: "String", editable: false },
{ title: "Time", width: 150, dataType: "float", align: "center",editor: timeEditor, getEditCellData: saveCell }
];
var timeEditor = function (ui,e) {
var $cell = ui.$cell, data = ui.data, rowIndx = ui.rowIndxPage, colIndx = ui.colIndx;
var dc = $.trim(data[rowIndx][colIndx]);
$cell.css('padding', '0');
var $inp = $("<input type='text' class='date4' maxlength='5' style='padding:0px;padding-bottom: 3px;border:0;vertical-align:bottom;width:147px;text-align: center;'/>")
.appendTo($cell)
.val(dc).timepicker({
buttonImage: "/assets/calendar.png",
onClose: function () {
$inp.focus();
saveCell
}
}).attr('readonly', 'true');
.focus();
}