Unable to activate datetimepicker and add new class
Unable to activate datetimepicker and add new class

i am trying to enable datetime picker on one of my fields but nothing is happening below is the code.
i have created the column defs to give the required datetime picker its own class
my column defs and dispatch_date column is the issue
$scrubberSettings.variables.tblValidate = $("#tblValidate").igGrid({
primaryKey: "aid_id",
width: "*",
autoCommit: true,
autoGenerateColumns: true,
responseDataKey: "aid_id",
columns: result.data[0].columnHeaders,
defaultColumnWidth: "*",
dataSource: result.data[0].tableData,
columnDefs: [
{ className: "dispatchdateclass", targets: 34 }
],
features: [
{
name: "Resizing"
},
{
name: "Sorting",
sortingDialogContainment: "window",
columnSorted: DataScrubber.markValidRows
},
{
name: "Paging",
pageSize: 10,
pageIndexChanged: DataScrubber.markValidRows
},
{
name: "Selection"
},
{
name: "Updating",
enableAddRow: false,
enableDeleteRow: false,
editMode: "dialog",
editRowEnded: function (evt, ui) {
if (ui.update)
DataScrubber.onEditDialogClosed(evt, ui);
},
editRowStarted: DataScrubber.markEditDialogColumnsValid,
rowEditDialogOptions: {
width: "530px",
height: "410px",
dialogTemplateSelector: "#dialogTemplate",
editorsTemplateSelector: "#editorsTemplate",
showReadonlyEditors: false
},
columnSettings: [
{ columnKey: "wsi_id", editorOptions: { type: "number", disabled: true } },
{ columnKey: "dispatch_date", editorType: "datetimepicker", className: 'dispatchdateclass', editorOptions: { mode: 'datetimepicker', type: "datetimepicker", disabled: false }, validation: true },
]
}
]
});
Replies
This is a duplicate of your other thread.
It doesn't look like you are using Datatbles but using a library called igGrid. Please use their documentation and support resources for questions about igGrid. I'm not sure if igGrid has a columnDefs option.
Kevin