DataTables warning: table id=… - Requested unknown parameter 'date' for row 0 & time‑zone support
25K reputation · 21 Nov 2020, 15:18 UTC
Problem
When a DataTable is initialized with a column that references a field not present in the row data, the library emits the error “DataTables warning: table id=… - Requested unknown parameter 'date' for row 0”. This warning indicates that the column’s data source is missing at initialization time.
Context
The DataTables dateTime plug‑in can sort ISO‑8601 strings, but it treats them as UTC. Without explicit conversion, the displayed times remain in UTC and sorting may produce misleading results for users in other time zones.
Unresolved Decision
Should DataTables implement native time‑zone conversion for date columns, or continue to rely on external libraries such as moment.js or custom render functions?
Questions
- What trade‑offs would adding native time‑zone support introduce in terms of API complexity and performance?
- How would such an addition affect the existing dateTime plug‑in’s sorting algorithm and compatibility with non‑ISO formats?
- What user experience expectations exist for developers who rely on DataTables to display localized dates without external dependencies?