DataTables plugins
jQuery DataTables provides a lot of built-in features and flexibility, but if you wish to add your own features or need extra flexibility, it does provide a plugin architecture.
Note
These are just some of the plugins available for the DataTables library. To see a full list of available plugins, visit https://datatables.net/plug-ins/index
Date sorting
Because of the wide variety of different date formats, sorting dates can sometimes prove to be very challenging. Fortunately, jQuery DataTables
provides a flexible solution for sorting date fields using the Moment.js
JavaScript library.
Note
Moment.js is a free and open source library that makes it easy to display, parse, manipulate, and validate dates in JavaScript. You can read more about the Moment.js library at http://momentjs.com/.
To enable date sorting on the Created Date
column used in the previous example, complete the following steps:
Open the
Index.cshtml
file inside theViews\Customer
folder.Include the
moment.js
library...