Skip to content

Commit

Permalink
Update: DataTable.use() will now accept a DateTime object to regi…
Browse files Browse the repository at this point in the history
…ster against the DataTables API

https://datatables.net/forums/discussion/75971
  • Loading branch information
AllanJard committed Apr 4, 2023
1 parent adb2f37 commit c39dab7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion js/api/api.static.js
Expand Up @@ -4,7 +4,8 @@
* Set the jQuery or window object to be used by DataTables
*
* @param {*} module Library / container object
* @param {string} type Library or container type `lib` or `win`.
* @param {string} [type] Library or container type `lib`, `win` or `datetime`.
* If not provided, automatic detection is attempted.
*/
DataTable.use = function (module, type) {
if (type === 'lib' || module.fn) {
Expand All @@ -14,6 +15,9 @@ DataTable.use = function (module, type) {
window = module;
document = module.document;
}
else if (type === 'datetime' || module.type === 'DateTime') {
DataTable.DateTime = module;
}
}

/**
Expand Down

0 comments on commit c39dab7

Please sign in to comment.