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

How to have arbitrary range visible? #582

Open
ursusursus opened this issue Sep 2, 2024 · 1 comment
Open

How to have arbitrary range visible? #582

ursusursus opened this issue Sep 2, 2024 · 1 comment

Comments

@ursusursus
Copy link

ursusursus commented Sep 2, 2024

Library information:

  • Version: 2.5.4
  • View or Compose module: 1.6.7

Question:

I'm using VerticalCalendar to display a range selection.

Range can span months, let's for now say its 13 days long - a range from 20th August to 2th September for example.

val calendarState = rememberCalendarState(
        startMonth = totalStart,
        endMonth = totalEnd,
        firstVisibleMonth = totalEnd, <--------
        firstDayOfWeek = daysOfWeek.first()
)

if I set firstVisibleMonth to the range month end, then it looks like this

image

because it tries to have 1th of September to be the first visible month.

I'd like for the default view to have both ends of the range visible, like this

image

so it's obvious where the start is

Is there a way to firstVisibleMonth to be sort of inbetween months?

@kizitonwose
Copy link
Owner

This is not possible at the moment, but why not use the month at the start of the range as the firstVisibleMonth? Seems like what the user would expect

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