Twipped / Kalendae

A javascript date picker that just works.
MIT License
1.99k stars 285 forks source link

Selected days shown on multiple months #140

Closed yehudahkay closed 9 years ago

yehudahkay commented 9 years ago

If the calendar shows multiple months the selected day/days are shown on both months. I think visually it would make more sense if the days would only be selected in the active month.

Twipped commented 9 years ago

This is intentional. If you wish to override this behavior, overwrite the styles on the out of month days by targeting the css selector .k-out-of-month.k-selected and setting it back to the values in .k-out-of-month

Twipped commented 9 years ago

Specifically the following will change the out-of-month days back to unselected, if you're using the default styles.

.kalendae .k-days span.k-selected.k-out-of-month {
  color: #ddd;
  border-color: #eee;
  background: #eee;
}
yehudahkay commented 9 years ago

Awesome! That did the trick. By the way, trying to select all the dates over say 6 months using setSelected() takes a while . Also if you have all the dates over six months selected it takes a while to unselect and select one date once you click on it. Any ideas?

Twipped commented 9 years ago

Sorry, no. That's not a use case I had considered when designing it. My only suggestion is to increase the number of months displayed.

I thought I had a way in there to let you connect two inputs for use as start and stop fields, but I don't see a way to do it now (it's been a long time since I wrote this).

yehudahkay commented 9 years ago

Thanks anyway, seems like at six months performance is still reasonable. The application has a calendar where you select if you want a charge to renew daily, weekly, monthly etc and then it shows you the schedule on an interactive calendar. So when they click daily I select all days.