day8 / re-com

A ClojureScript library of reusable components for Reagent
https://re-com.day8.com.au
MIT License
797 stars 146 forks source link

datepicker doesn't switch month panel when updating model #97

Closed pbaille closed 7 years ago

pbaille commented 8 years ago

When i swap! the model of a datepicker to a Date not in the current month, the UI remain on the same month I have to switch month manually to retreive the selection.

Frozenlock commented 8 years ago

I just noticed the same thing. I wanted to use the datepicker to show a given date, but the visible month does not update when the model atom is updated.

As an aside, I also noticed that adding :disabled? true will not remove deactivate the month-selection arrows.

Edit: Would it be better to create a whole new component (re-using some parts of datepicker) to show dates on a calendar?

Frozenlock commented 8 years ago

Here's the "bug" in action :

calendar-not-showing-current-date

(I know @Gregg8 already referenced this issue, but I just wanted to make it clear.)