Date sorting

Date sorting

tscroshtscrosh Posts: 4Questions: 4Answers: 0

Hello I tried to add the plugin for date sorting, code inserted in ASP page is following :

    <script>
                $(document).ready(function() {
            $.fn.dataTable.moment( 'D/M/YYYY' );
                    $('#TAB31').DataTable({ 
                    responsive: true, 
                    pageLength: 20 , 
                    lengthMenu: [[20, 30, 50, -1], [20, 30, 50, "All"]], 
                    language: { "url": "../lang/French.json"},
                    columnDefs: [ {
                        targets: [ 0 ],
                        orderData: [ 1, 0 ]
                        }, {
                        targets: [ 1 ],
                        orderData: [ 1, 0 ]
                        }, {
                        targets: [ 4 ],
                        orderData: [ 4, 0 ]
                        } ]
                    }

            );
                });
            </script>

But after inserting $.fn.dataTable.moment( 'D/M/YYYY' ); the date looks to be sorted correctly but now the complete table responsive settings are away. I'm not familiar with JS so i suppose i have done an error somewhere ...

Thanks for all info & help on this

Answers

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

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

This discussion has been closed.