Does range-dates.js still work?

Does range-dates.js still work?

gauzegauze Posts: 6Questions: 2Answers: 0

I have a single table in my example here
http://entropy.tmok.com/~gauze/tt.html

I ran the code through debug.db.net and it only shows one issue with using max-width on the table

the upload code I got was ucahoj

Error messages shown:

https://cdn.datatables.net/plug-ins/1.13.6/filtering/row-based/range_dates.js:22:24
_fnFilterCustom@https://cdn.datatables.net/1.13.6/js/jquery.dataTables.js:4459:20
_fnFilterComplete@https://cdn.datatables.net/1.13.6/js/jquery.dataTables.js:4427:19
_fnReDraw@https://cdn.datatables.net/1.13.6/js/jquery.dataTables.js:3615:21
_fnInitialise@https://cdn.datatables.net/1.13.6/js/jquery.dataTables.js:4862:12
loadedInit@https://cdn.datatables.net/1.13.6/js/jquery.dataTables.js:1294:19
https://cdn.datatables.net/1.13.6/js/jquery.dataTables.js:1307:5
each@https://code.jquery.com/jquery-3.6.0.js:385:19
each@https://code.jquery.com/jquery-3.6.0.js:207:17
DataTable@https://cdn.datatables.net/1.13.6/js/jquery.dataTables.js:859:8
$.fn.DataTable@https://cdn.datatables.net/1.13.6/js/jquery.dataTables.js:15701:18
http://entropy.tmok.com/~gauze/tt.html:19:37
mightThrow@https://code.jquery.com/jquery-3.6.0.js:3766:29
https://code.jquery.com/jquery-3.6.0.js:3834:12
https://code.jquery.com/jquery-3.6.0.js:3872:16
fire@https://code.jquery.com/jquery-3.6.0.js:3500:31
fireWith@https://code.jquery.com/jquery-3.6.0.js:3630:7
fire@https://code.jquery.com/jquery-3.6.0.js:3638:10
fire@https://code.jquery.com/jquery-3.6.0.js:3500:31
fireWith@https://code.jquery.com/jquery-3.6.0.js:3630:7
ready@https://code.jquery.com/jquery-3.6.0.js:4110:13
completed@https://code.jquery.com/jquery-3.6.0.js:4120:9
https://code.jquery.com/jquery-3.6.0.js:4136:11
https://code.jquery.com/jquery-3.6.0.js:36:10
https://code.jquery.com/jquery-3.6.0.js:40:4
undefined jquery-3.6.0.js:4050:18

Description of problem:

prevents full load of page

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,327Questions: 26Answers: 4,949
    edited October 2023 Answer ✓

    This is from the date-range.js docs:

    Note that you will likely need to change the id's on the inputs and the columns in which the start and end date exist.

    This is referring to this code in the plugin:

            var iFini = document.getElementById('fini').value;
            var iFfin = document.getElementById('ffin').value;
            var iStartDateCol = 6;
            var iEndDateCol = 7;
    

    You will probably want to download and load this from a local resource so you can update the input id's and columns appropriately.

    The error:

    Uncaught TypeError: Cannot read properties of null (reading 'value')

    Is the result of this statement not finding an input with the id of fini.

    Also, I may have missed it but I don't see where you have date input elements for #min and #max.

    Kevin

  • gauzegauze Posts: 6Questions: 2Answers: 0

    ok I see I had the wrong idea about this plugin, I'm going to switch to doing this server side now. Thank you.

Sign In or Register to comment.