Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError when exiting input with bad value #356

Open
mscomparin opened this issue Oct 14, 2020 · 0 comments
Open

Uncaught TypeError when exiting input with bad value #356

mscomparin opened this issue Oct 14, 2020 · 0 comments

Comments

@mscomparin
Copy link

Opening the calendar with no value on the input tag when you enter a bad date and focus out the field, an Uncaught TypeError is raised.

You can reproduce the issue following the steps below.

  1. Click on the calendar icon.
  2. Remove the generated date from the input with the calendar opened.
  3. Enter a bad date (eg. "asdaffhsakfasdfhsafh").
  4. Click outside the input to close the calendar.

This is the stack-trace in the console of the browser(F12, not the little one on the page that just shows <a class='gotoLine' href='#402:25] TypeError: this._dates[index'>402:25] TypeError: this._dates[index</a> is undefined) when I get the error on the jsfiddle you provided (see CONTRIBUTING.md) https://jsfiddle.net/Eonasdan/bdxss6m8/:

Uncaught TypeError: this._dates[index] is undefined
    _setValue https://rawgit.com/tempusdominus/bootstrap-4/master/build/js/tempusdominus-bootstrap-4.js:472
    _change https://rawgit.com/tempusdominus/bootstrap-4/master/build/js/tempusdominus-bootstrap-4.js:493
    _jQueryHandleThis https://rawgit.com/tempusdominus/bootstrap-4/master/build/js/tempusdominus-bootstrap-4.js:2699
    _jQueryInterface https://rawgit.com/tempusdominus/bootstrap-4/master/build/js/tempusdominus-bootstrap-4.js:2706
    TempusDominusBootstrap4 https://rawgit.com/tempusdominus/bootstrap-4/master/build/js/tempusdominus-bootstrap-4.js:2734
    jQuery 8
        dispatch
        handle
        add
        on
        each
        each
        on
        on
    TempusDominusBootstrap4 https://rawgit.com/tempusdominus/bootstrap-4/master/build/js/tempusdominus-bootstrap-4.js:2729
    <anonymous> https://rawgit.com/tempusdominus/bootstrap-4/master/build/js/tempusdominus-bootstrap-4.js:2777
    <anonymous> https://rawgit.com/tempusdominus/bootstrap-4/master/build/js/tempusdominus-bootstrap-4.js:2779
tempusdominus-bootstrap-4.js:472:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant