diff --git a/example/advanced.js b/example/advanced.js index 076260a..6b24c83 100644 --- a/example/advanced.js +++ b/example/advanced.js @@ -32,7 +32,8 @@ $(document).ready(function () { "column": 2, "type": "datepicker", // requires jQuery UI: http://http://jqueryui.com/download/ "options": { - "icon": "http://jqueryui.com/resources/demos/datepicker/images/calendar.gif" // Optional + "icon": "http://jqueryui.com/resources/demos/datepicker/images/calendar.gif", // Optional + "defaultValue": new Date(), } } // Nothing specified for column 3 so it will default to text @@ -53,4 +54,4 @@ function destroyTable() { table.destroy(); table.MakeCellsEditable("destroy"); } -} \ No newline at end of file +} diff --git a/js/dataTables.cellEdit.js b/js/dataTables.cellEdit.js index 974810c..d856700 100644 --- a/js/dataTables.cellEdit.js +++ b/js/dataTables.cellEdit.js @@ -203,7 +203,8 @@ function getInputHtml(currentColumnIndex, settings, oldValue) { showOn: "button", buttonImage: icon, buttonImageOnly: true, - buttonText: "Select date" + buttonText: "Select date", + defaultDate: inputSetting.options.defaultValue }); },100); break;