How to get date range value in the Datatable for filename?

How to get date range value in the Datatable for filename?

elge143elge143 Posts: 1Questions: 1Answers: 0
"buttons": [
         {
        extend: 'colvis',
        text: 'Show/hide columns'
        },
        {
            extend: 'excelHtml5',
            title: 'Sold_Products_'+$("#date").val()+'-'+$("#date2").val(),
            footer: true
        },
    ],

$date returns null and $date2 also is null

Answers

  • colincolin Posts: 15,142Questions: 1Answers: 2,586

    Yep, those values will be collected when the page first loads, when I imagine they would be empty. You would need to change the string like this,

    Colin

This discussion has been closed.