android-collapse-calendar-view icon indicating copy to clipboard operation
android-collapse-calendar-view copied to clipboard

calls to selectDate() are not reflected on UI

Open semenoh opened this issue 10 years ago • 4 comments

Hi, I'm trying to set date next way:

calendar.getManager().selectDay(new LocalDate(y, m, d);

It changes date but changes are not reflected on UI until I start expanding view. It does not update view if I collapse it.

As a workaround I tried to call

calendar.populateLayout();

But it work only in selected week or month. It does not switch to next/perv week/month when selection goes outside.

semenoh avatar Jan 13 '15 13:01 semenoh

Hey,

so this library wasn't 100% finished when I pushed it to github, that's why version 0.1.0. It has also been a while since I worked on it so I can't remember if this should be handled. I will try to find some time tho and take a closer look into this issue.

blazsolar avatar Jan 13 '15 16:01 blazsolar

Similarly calendar.getManager().toggleView(); doesn't update the UI. However calendar.populateLayout(); fixes it.

GautamGupta avatar Apr 27 '15 20:04 GautamGupta

I'll try to look into this in a next few days.

blazsolar avatar Apr 28 '15 06:04 blazsolar

I have implemented requests above. You can see them in #6 PR. Still have to test them that is why they are not yet merged in. I'll do that in coming days.

There are 2 new public methods:

  • CollapseCalendarView.toggle()
  • CollapseCalendarView.selectDate()

You can toggle and select view with those 2 methods programmatically.

blazsolar avatar May 03 '15 17:05 blazsolar