Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82226

Unable to activate datetimepicker and add new class

$
0
0

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 },
                                ]
                            }
                        ]
                    });

Viewing all articles
Browse latest Browse all 82226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>