vigetlabs / ca11y

A lightweight accessible dependency-free datepicker
http://code.viget.com/ca11y
26 stars 6 forks source link

When opened, should ca11y show the month of the "selected" date? #37

Closed averyvery closed 8 years ago

averyvery commented 8 years ago

Noticed that even though I have a date in the future "selected", ca11y opens to the current month by default. Is this the desired behavior? It's kind of annoying, because if the date is next year and I want to move it by one day, I have to click 12 times to get to the month.

If my change makes sense (and it's not something I've just messed up on my end), I'll issue a PR.

averyvery commented 8 years ago

Actually, it looks like more is going on here than I thought. Paging the month forward/backwards seems to automatically set the date to the first of the new month, which isn't the expected behavior from a cal picker. Ideally, you'd highlight "today" with one style, while preserving the "selected" date as you page (not updating the value of date).

Right?

averyvery commented 8 years ago

Hmm, nevermind, something was wrong with my parsing. I still think that incrementMonth might not need to change the date itself, but this works.