Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I add a selection programmatically? #18

Closed
bellierjonathan opened this issue Mar 7, 2019 · 4 comments
Closed

Can I add a selection programmatically? #18

bellierjonathan opened this issue Mar 7, 2019 · 4 comments

Comments

@bellierjonathan
Copy link

bellierjonathan commented Mar 7, 2019

Hello,

I would like to select all the week (Monday to sunday) when a user clicks on a day.

I'm trying to select all days with onDateClickListener and setupCalendar but it's not work.

Do you have any idea? :/

@rAseri
Copy link
Contributor

rAseri commented Mar 7, 2019

Hi!
In the current implementation the only way to setup prgrammatically preselected dates it's the CalendarView.setupCalendar method. It isn't the best way, but you can try to use this method to achieve what you want.

Anyway, it would be good to be able to setup preselected dates with some public method / property. I'll think about adding separate method for preselected dates in the next version.

@bellierjonathan
Copy link
Author

bellierjonathan commented Mar 7, 2019

Ok cool! Thanks for your answer 😉 I will check again tomorrow.

@bellierjonathan
Copy link
Author

bellierjonathan commented Mar 14, 2019

For week selection I made a pull request. I tried to define same way as you go.

#22

@rAseri
Copy link
Contributor

rAseri commented Apr 7, 2019

The new version of the library (2.0.0-beta1) has been released.
https://github.com/CleverPumpkin/CrunchyCalendar/releases/tag/v2.0.0-beta1

Now you can update selected dates with a new CalendarView.updateSelectedDates method.

@rAseri rAseri closed this as completed Apr 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants