Baremetrics / calendar

Date range picker for Baremetrics
MIT License
679 stars 78 forks source link

Saturdays are skipped on Microsoft EDGE and IE11 #89

Closed serg0x closed 5 years ago

serg0x commented 6 years ago

We want to use your open sourced date picker, but it is heavily buggy on MS browsers, look at the dates, every Saturday is skipped https://twitter.com/serglotz/status/1014111701971755008

screen shot 2018-07-03 at 13 39 54

hisnameisjimmy commented 5 years ago

Can be fixed by hardcoding the width for the following classes, Edge seems to choke on the ~"calc(100% / 7)". Could potentially cause issues down the line if you want to keep the library up to date, but it works for our purposes.

.daterange .dr-selections .dr-calendar .dr-days-of-week-list .dr-day-of-week
{
    text-align: center;
    width: 14.28%;
}

.daterange .dr-selections .dr-calendar .dr-day-list .dr-day
{
    cursor: pointer;
    padding: .3125rem;
    text-align: center;
    width: 14.28%;
}
kalepail commented 5 years ago

Yeah I appreciate the attempt but too many people are using this to be able to settle for a hard coded value. Gotta stay fluid. There are likely solutions out there but I’ll have to fool with it. Don’t have an edge browser to test in either so I’ll have to use something like browserstack. Glad you found something that fixes for now though for you.

serg0x commented 5 years ago

Thx for quick fix Jimmy. Thx for reply Tyler 👍 . You can test by using virtual box and the official MS edge image https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/ if it helps :)

hisnameisjimmy commented 5 years ago

Yeah I used the Microsoft provided VM to test. This is still fluid, as we're using percentage widths. It's just not quite 1/7, it's a tiny bit less (14.28% instead of 14.2857%). However, visually, it looks identical.

This is what it looks like in Edge:

msedge_-_win10__running_

serg0x commented 5 years ago

Hey yes, thx, I already implemented your fix Jimmy, and it works 🥇 . My explanation was for Tyler, I thought he wanted to work on the fix for himself :)

kalepail commented 5 years ago

Pushed the 14.28% fix in 1.0.13. Thanks guys!