qodesmith / datepicker

Get a date with JavaScript! A datepicker with no dependencies.
344 stars 101 forks source link

Navigation is not working #92

Closed cargarn closed 4 years ago

cargarn commented 4 years ago

I am trying to use "navigate" function, and it is failing:

picker.navigate(new Date(2020, 3, 3));

I got this error: ReferenceError: date is not defined

qodesmith commented 4 years ago

I'm unable to reproduce this. Can you share the full datepicker setup you've got going?

qodesmith commented 4 years ago

@cargarn Actually, you were right! Turns out I mistakenly had set date as a global variable inside the navigate function. So in environments using 'use strict', that would cause the error. This is fixed in 5.12.0. Thanks for the catch!