How to change searchBuilder date format on a VUE3 proyect.
How to change searchBuilder date format on a VUE3 proyect.
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
I've tried so many options but I keep getting the next message when using the code:
$(document).ready(function () {
$.fn.dataTable.moment( 'DD/MM/YY' );
})
It shows an ERROR message:
jquery__WEBPACK_IMPORTED_MODULE_11___default(...).fn.DataTable.moment is not a function
Ive done a lot of research on all the topics including the official documentation but nothing seems to work.
I need to be able to use searchBuilder with another format different than 'YYYY-MM-DD'
Please help.
Answers
Use
DataTable.datetime(...)
rather thanDataTable.moment(...)
(note thatDataTable === $.fn.dataTable
).The
DataTable.datetime(...)
function is built into DataTables 1.13+. The other needs a plug-in.You can see an example of
DataTable.datetime(...)
here.Allan