nazar-pc / PickMeUp

Really simple, powerful, customizable and lightweight standalone datepicker
BSD Zero Clause License
615 stars 191 forks source link

Some dates in october can't be selected #180

Closed andrefpc closed 6 years ago

andrefpc commented 7 years ago

Hello,

I tryed to use the plugin, but I found a little bug.

When i choose dates between 2017-10-16 and 2017-10-31, the background of date don't change and seems not mached.

I made a test on DEMO aplication, exposed in github, and the problem appears too.

nazar-pc commented 7 years ago

Can you make a live demo?: https://github.com/nazar-pc/PickMeUp#contribution

andrefpc commented 7 years ago

The problem occurs in your demo!

Try to select "2017-10-24", this date will not be selected.

nazar-pc commented 7 years ago

Here on github and on jsfiddle works perfectly for me

andrefpc commented 7 years ago

This is strange, because here a make tests in more than one browsers and the problem persists. Only for dates between 2017-10-16 and 2017-10-31!

nazar-pc commented 7 years ago

Are you sure your OS is up to date? Can't reproduce myself and I know no reason why it might not work properly.

andrefpc commented 7 years ago

I'm sure. The error are unexplainable, but occurs in my tests!

rbferreyra commented 6 years ago

I make tests in demo page and the problem persists. Can you resolve that issue?

Tested in SO Linux Mint, Browser Google Chrome 61 and Firefox 55

nazar-pc commented 6 years ago

I can't resolve issue that I can't reproduce, please help me to do this. I can select any date on any month in any mode without issues. My OS is Ubuntu 17.10 x64 with all updates and browsers are Nightly builds of Firefox and Chromium.

  1. In which mode (single date, range or multiple) you can't select date?
  2. Can you record a screencast with this issue?
  3. What exactly version of Linux Mint are you using (version and flavor, so that I can install exactly the same version in VM)? (and make sure you have all available updates are installed)
  4. Also which timezone are you using?
rbferreyra commented 6 years ago
  1. All mode
  2. https://drive.google.com/file/d/0B-VwjztxZq_BYnE1Wjc3RzRTZ3M/view
  3. RELEASE=18
    CODENAME=sarah
    EDITION="Xfce 64-bit"
    DESCRIPTION="Linux Mint 18 Sarah"
    DESKTOP=Xfce
    TOOLKIT=GTK
    NEW_FEATURES_URL=http://www.linuxmint.com/rel_sarah_xfce_whatsnew.php
    RELEASE_NOTES_URL=http://www.linuxmint.com/rel_sarah_xfce.php
    USER_GUIDE_URL=help:linuxmint
    GRUB_TITLE=Linux Mint 18 Xfce 64-bit
  4. Time zone: America/Sao_Paulo (BRT, -0300)
sasknot commented 6 years ago

I'm having the same issue... I tried to log in line 508 of pickmeup.js and got this:

console.log('111', _AAAAAA, options.date, val, day_element) (_AAAAAA means the 'if condition' down the line 508)

15-10-2017 screen shot 2017-10-03 at 16 18 02

16-10-2017 screen shot 2017-10-03 at 16 18 16

17-10-2017 screen shot 2017-10-03 at 16 18 24

As you can see, when I click in 15-10-2017, options.date and val are equal, but when I click 16-10-2017 and 17-10-2017, they are different... I'm trying to debug more here to get solutions.

sasknot commented 6 years ago

I think the problem is with Daylight Time... In Brazil we're going to add one hour, so from UTC-3 we're going to UTC-2... I think this mess with the .valueOf() calculation

I added local_date.setHours(0); to line 477 from pickeup.js and it worked.

nazar-pc commented 6 years ago

With your timezone I was able to reproduce an issue and I've just committed c6c8744d49eb074f378ed6c78d15720f673a0498 that is intended to fix it. Test it, please, before I publish new release to NPM.

nazar-pc commented 6 years ago

I've just released new version 3.0.9, it should fix the issue, let me know if you have other issue