chrisdavies / tiny-date-picker

A small, modern, dependency-free date picker
https://chrisdavies.github.io/tiny-date-picker/
415 stars 87 forks source link

Selected day is mistakenly passed to the previous month. #59

Closed gety9 closed 6 years ago

gety9 commented 6 years ago

1 Select Mar 10 2018 2 Go to previous month 3 Both Mar 10 2018 and Feb 10 2018 are shown as selected. https://puu.sh/yTNXt/997ef0997d.mp4

chrisdavies commented 6 years ago

Hm. This is by design, it's just a weird edge case that both the highlighted date and the selected date can show up on the screen when a previous / next month's days are showing. But I think I'd rather it behave this way than not.

You can override it via your own CSS rule:

.dp-edge-day.dp-selected {
  background: transparent;
}

By the way, this is a great bug report. I love that you gave me a video!

kvlsrg commented 6 years ago

Also it's need to override color:

.dp-edge-day.dp-selected {
  background: transparent;
  color: #AAA;
}