How to sort on Date Column in DataTable - Answer is
How to sort on Date Column in DataTable - Answer is
pawansoftengr
Posts: 1Questions: 1Answers: 0
Question: How to sort on Date Column in DataTable ?
Answer:
1. Define Column Definition
2. Add Type:Date and Target column as index
3. Example: all the columns having date is added below and they will sort the date.
Answers
Setting the
columns.type
option should basically never be done manually. If DataTables doesn’t pick it up automatically that your column is a date type, then forcing it to do so will just cause an error in the sorting.Perhaps you can give a link to a page showing the issue please?
Also, of interest, I’m working on a new feature for DataTables 1.12 to make date/time sorting much easier
Allan
Use the datetime sorting solution presented in this blog.
Kevin