issue with scrollX if we put Bootstrap-Datetimepicker in footer (jsfiddle attached)

issue with scrollX if we put Bootstrap-Datetimepicker in footer (jsfiddle attached)

vaibhavsharma56vaibhavsharma56 Posts: 1Questions: 1Answers: 0

There is an issue with datatable & bootstrap-datetimepicker,if we put datetimepicker in <tfoot> and scrollX is true, then datetimepicker is not working.

If we just set scrollX to false, and it starts working

DEMO :

https://jsfiddle.net/vaibhavsourcefuse/f5cg6suq/

Please check it

Answers

  • allanallan Posts: 61,665Questions: 1Answers: 10,096 Site admin

    I guess the date time picker being used there is doing some kind of auto initialisation based on the data-* attributes. I think you'll probably need to initialise it directly once the table has completed its initialisation using the initComplete call.

    Something like this: https://jsfiddle.net/rtbevxow/ - but it still isn't working. I'm not clear on why that would be. You might need to ask the author of the date time picker library you are using.

    One thing to be aware of is that when scrollX is enabled, DataTables will close the footer. What you are seeing is probably an artefact of that.

    Allan

This discussion has been closed.