DataTables incompatible with jQuery UI DatePicker in TFOOT

DataTables incompatible with jQuery UI DatePicker in TFOOT

shylionshylion Posts: 4Questions: 0Answers: 0

When you have a datepicker input in table footer, it doesn't allow to choose a date, because of duplicate id error.
When you .draw() a DataTable, whole TFOOT gets duplicated along with datepicker inputs.
Worked around by finding and deleting duplicate input, like:

after any .draw()
.find("DIV.dataTables_sizing").find("INPUT.hasDatepicker").remove();

Replies

  • shylionshylion Posts: 4Questions: 0Answers: 0

    Is there any better workaround?

  • shylionshylion Posts: 4Questions: 0Answers: 0

    Found a better workaround:

    table.DataTable().on("draw", function() {
          $(this).find("DIV.dataTables_sizing").find("INPUT.hasDatepicker").remove();
    });
    
  • shylionshylion Posts: 4Questions: 0Answers: 0

    It is also incompatible with radio inputs, when you preselect a value on table creation.

This discussion has been closed.