I ran into a very strange problem.
I am creating a report package, and part of it uses the daterangepicker library to select a date range. However, during a function that creates everything, it just stops when it comes to calling creation $("#date-range-picker").daterangepicker(options). After some time, tracking calls through daterangepicker, jQuery and jQueryUI, I find that the call new Date()fails with an error RangeError: Maximum call stack size exceeded, and it seems that the code inside just keeps the error and still considers the Date object.
I tested creating a new date while the script was paused and it caused the same error. The same error occurs if the script fails. But not before the script starts.
UPDATE: I found a problem, it was a repeat of the daterangepicker script parameter.
source
share