longbill / jquery-date-range-picker

A jQuery plugin that allows user to select a date range
MIT License
1.12k stars 579 forks source link

TypeError: t is undefined #446

Closed dday9 closed 4 years ago

dday9 commented 5 years ago

I have opened up the question on StackOverflow in hopes that this isn't an issue with the plugin, but rather something else. However when attempting to deploy the plugin, I receive the following error:

TypeError: t is undefined

I am using jQuery 3.3.1 and Moment 2.22.2. The JavaScript files are referenced in the following order:

  1. jQuery
  2. moment
  3. jquerydaterangepicker

So what I found was that I had changed the ID of the element that I was initializing the plugin on, but forgot to update the JS code to reflect that change. E.G. - My markup was: <input class="form-control" id="agency_date_range" /> But my JS was: $('#agency_date_range').dateRangePicker({...

I would prefer to see a more meaningful error such rather than the one that was given.