mikecoj / MCDatepicker

A vanilla JavaScript Datepicker
https://mcdatepicker.netlify.app/
MIT License
93 stars 18 forks source link

Views of months and years not working on Safari #56

Closed jacekf1234 closed 3 years ago

jacekf1234 commented 3 years ago

In windows browsers all working very well, but on Safari the calendar has some bugs. When click to change month or year the mc-picker__body not change content from days to months or years. https://www.youtube.com/watch?v=ECe8xoqBXDo&ab_channel=%C5%81ukaszMachejek

mikecoj commented 3 years ago

Hi there, thanks for reporting this, I'll check it soon.

mikecoj commented 3 years ago

Hey, I just tested the component on safari and it works fine! Follow the link below and let me know if it works for you too! https://615f0df210de0e00075be5b3--mcdatepicker-dev.netlify.app/

jacekf1234 commented 3 years ago

Sorry, Your library it's ok. Unfortunately, some css styles in my code don't work on safari, for example calc(vw + px) and they were causing the problem.

I have one more problem on all browsers if I set dateFormat = 'yyyy-mm'. I can't click any link on my site located under the calendar area (when it is open) after it was closed by canceling. When I click instead of open href from console return "Uncaught TypeError: Cannot read properties of null (reading 'store')". For dateFormat = 'yyyy-mm-dd' all wokrs well.

mikecoj commented 3 years ago

Can you reproduce that on jsFiddle, and share the link with me?

jacekf1234 commented 3 years ago

https://jsfiddle.net/pzdumyw2/

  1. Open calendar
  2. Click outside to close
  3. Click any link

If you change var month to false, there is no error.

FIX: You uncomment the lines at the bottom of the js

mikecoj commented 3 years ago

Hey,

Check the new patch version, it should fix this issue!