Is their any way to dynamically generate columns for each date on the basis of date range picker.

Is their any way to dynamically generate columns for each date on the basis of date range picker.

VishalsvisualVishalsvisual Posts: 1Questions: 1Answers: 0

(https://datatables.net/forums/uploads/editor/ot/49rmpahv6h61.png)

---> I want to generate columns for each date on selecting date range from the date - range picker.
and fetch the particular data of the each field of that particular task.

---> Also I want to colour the boxes if the task falls in that range.
----> In attachment I have implemented by using jquery, can i do this using datatables.
Comment if you have any solution

Answers

  • allanallan Posts: 61,686Questions: 1Answers: 10,100 Site admin

    You can certainly dynamically generate columns by using the columns array or by creating them in the HTML. You have colspan in the header elements there though, which isn’t possible to create with just columns - you’ve have to create the HTML for it - which it looks like you are doing already. So to my mind, and unless I’m missing something, you’d just run DataTables on top of the table that you’ve created?

    Allan

This discussion has been closed.