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

[Question] How to disable past days in calendar dialog with v1.3.0? #83

Open
starry-shivam opened this issue Feb 20, 2024 · 2 comments
Open

Comments

@starry-shivam
Copy link

Hello, first off, thank you creating this library. I've been using it in some of my apps, and recently I updated from version 1.1.0 to 1.3.0. I noticed there were quite a few API changes, and while I managed to adapt most of them to maintain the state of my dialogs as they were in version 1.1.0, I'm struggling with disabling past days in the calendar. Previously, all I had to do was pass disabledTimeline = CalendarTimeline.PAST inside CalendarConfig, but in the latest version, there doesn't seem to be such an option. Instead, it only accepts a list of dates to disable, which isn't quite what I'm looking for. Any assistance in resolving this would be greatly appreciated. Thank you.

@starry-shivam starry-shivam changed the title How to disable past days in v1.3.0 [Question] How to disable past days in calendar dialog with v1.3.0? Feb 20, 2024
@starry-shivam
Copy link
Author

Actually, don't mind it. Upon further digging, I found a new boundary parameter that I could use to achieve the same results.

LocalDate.now()..LocalDate.now().plusYears(100)

However, I must say that the previous implementation was much simpler, as users didn't have to write their own bounding logic to achieve the similar results.

@maxkeppeler
Copy link
Owner

I reopened the PR. You're right, even though it works flawlessly as it is right now, I will offer a way to simplify disabling the past or future days (inclusive or exclusive today). Maybe a different constructor. Thanks for the comment, hope you like this library.

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