mymth / vanillajs-datepicker

A vanilla JavaScript remake of bootstrap-datepicker for Bulma and other CSS frameworks
MIT License
737 stars 152 forks source link

DateRangePicker - Upgrading from 1.0 to 1.10 #46

Closed pmarciniuk closed 3 years ago

pmarciniuk commented 3 years ago

Hi,

I've been using the DateRangePicker v1.0 and everything was working fine. I have the simplest implementation ever. As per documentation, a container with 2 input elements inside. I've decided to go for the latest version as I really need the new feature that been added (updateOnBlur).

I've replaced the source files (I'm using the From Browser implementation link). I didn't change my implementation and it just stopped to work. I reviewed the changelog and I can't see any breaking changes with the implementation. I reviewed the documentation and went through the source code. Looks like there is a problem with Datepicker instance while using the Date Range Picker. Could you please review it? Those are the errors that I'm getting.

Screenshot 2020-12-29 at 18 38 38 Screenshot 2020-12-29 at 18 38 44

Thank you!

mymth commented 3 years ago

I'm sorry it's a bug. In Datepicker constructor, I wrote a code to check the class of passed range picker object without importing the DateRangePicker class. But I just noticed it doesn't work when minified. I'll fix it ASAP.

For a temporary solution, could you use un-minified version until the fix is released?

<script src="https://cdn.jsdelivr.net/npm/vanillajs-datepicker@1.1.0/dist/js/datepicker-full.js"></script>

Sorry for the inconvenience.

pmarciniuk commented 3 years ago

Please update in this issue when it's ready. Thank you!

mymth commented 3 years ago

The new v1.1.1 that includes this fix has just been released.