diff --git a/buildSrc/src/main/java/com/kizitonwose/calendar/buildsrc/Build.kt b/buildSrc/src/main/java/com/kizitonwose/calendar/buildsrc/Build.kt index eff577f7..f87ab9e2 100644 --- a/buildSrc/src/main/java/com/kizitonwose/calendar/buildsrc/Build.kt +++ b/buildSrc/src/main/java/com/kizitonwose/calendar/buildsrc/Build.kt @@ -11,8 +11,8 @@ object Config { } object Version { - val android = "2.6.2-SNAPSHOT" - val multiplatfrom = "2.6.2-SNAPSHOT" + val android = "2.6.3-SNAPSHOT" + val multiplatfrom = "2.6.3-SNAPSHOT" fun String.isNoPublish() = this == VERSION_NO_PUBLISH } diff --git a/docs/Compose.md b/docs/Compose.md index 34f4fbbd..1f270efe 100644 --- a/docs/Compose.md +++ b/docs/Compose.md @@ -422,20 +422,52 @@ fun Day(day: CalendarDay) { - **isScrollInProgress**: Whether this calendar is currently scrolling by gesture, fling, or programmatically. +**`YearCalendarState` properties for `HorizontalYearCalendar` and `VerticalYearCalendar`:** + +- **firstVisibleYear**: The first year that is visible on the calendar. + +- **lastVisibleYear**: The last year that is visible on the calendar. + +- **layoutInfo**: A subclass of `LazyListLayoutInfo` calculated during the last layout pass. For example, you can use it to calculate what items are currently visible. + +- **isScrollInProgress**: Whether this calendar is currently scrolling by gesture, fling, or programmatically. + ### State methods -**`CalendarState` methods:** +**`CalendarState`** + +- **scrollToDate(date: LocalDate)**: Instantly scroll to a date on the calendar without an animation. -- **scrollToMonth(month: YearMonth)**: Instantly scroll to a specific month on the calendar without an animation. +- **animateScrollToDate(date: LocalDate)**: Scroll to a date on the calendar with smooth scrolling animation. + +- **scrollToMonth(month: YearMonth)**: Instantly scroll to a month on the calendar without an animation. - **animateScrollToMonth(month: YearMonth)**: Scroll to a month on the calendar with smooth scrolling animation. -**`WeekCalendarState` methods:** +**`WeekCalendarState`** + +- **scrollToDate(date: LocalDate)**: Instantly scroll to a date on the calendar without an animation. + +- **animateScrollToDate(date: LocalDate)**: Scroll to a date on the calendar with smooth scrolling animation. - **scrollToWeek(date: LocalDate)**: Instantly scroll to the week containing the given date on the calendar without an animation. - **animateScrollToWeek(date: LocalDate)**: Scroll to the week containing the given date on the calendar with smooth scrolling animation. +**`YearCalendarState`** + +- **scrollToDate(date: LocalDate)**: Instantly scroll to a date on the calendar without an animation. + +- **animateScrollToDate(date: LocalDate)**: Scroll to a date on the calendar with smooth scrolling animation. + +- **scrollToMonth(month: YearMonth)**: Instantly scroll to a month on the calendar without an animation. + +- **animateScrollToMonth(month: YearMonth)**: Scroll to a month on the calendar with smooth scrolling animation. + +- **scrollToYear(year: Year)**: Instantly scroll to a year on the calendar without an animation. + +- **animateScrollToYear(year: Year)**: Scroll to a year on the calendar with smooth scrolling animation. + There's no need to repeat the documentation here. Please see the relevant class for all properties and methods available with proper documentation. ### Date clicks diff --git a/docs/View.md b/docs/View.md index 1dad7016..fab9a5ec 100644 --- a/docs/View.md +++ b/docs/View.md @@ -411,7 +411,7 @@ calendarView.dayBinder = object : MonthDayBinder { All the respective XML attributes listed above are also available as properties of the CalendarView and WeekCalendarView classes so they can be set via code. So in addition to those, we have: -**`CalendarView` properties:** +**`CalendarView`** - **monthScrollListener**: Called when the calendar scrolls to a new month. Mostly beneficial if `scrollPaged` is `true`. @@ -423,7 +423,7 @@ All the respective XML attributes listed above are also available as properties - **monthMargins**: The margins, in pixels to be applied on each month view. This can be used to add a space between two months. -**`WeekCalendarView` properties:** +**`WeekCalendarView`** - **weekScrollListener**: Called when the calendar scrolls to a new week. Mostly beneficial if `scrollPaged` is `true`. @@ -435,7 +435,7 @@ All the respective XML attributes listed above are also available as properties - **weekMargins**: The margins, in pixels to be applied on each week view. This can be used to add a space between two weeks. -**`YearCalendarView` properties:** +**`YearCalendarView`** - **yearScrollListener**: Called when the calendar scrolls to a new year. Mostly beneficial if `scrollPaged` is `true`. @@ -457,7 +457,7 @@ All the respective XML attributes listed above are also available as properties ### Methods -**`CalendarView` methods:** +**`CalendarView`** - **scrollToDate(date: LocalDate)**: Scroll to a specific date on the calendar. Use `smoothScrollToDate()` to get a smooth scrolling animation. @@ -475,7 +475,7 @@ All the respective XML attributes listed above are also available as properties - **updateMonthData()**: Update the calendar's start month or end month or the first day of week after the initial setup. The currently visible month is preserved. The calendar can handle really large date ranges so you may want to setup the calendar with a large date range instead of updating the range frequently. -**`WeekCalendarView` methods:** +**`WeekCalendarView`** - **scrollToDate(date: LocalDate)**: Scroll to a specific date on the calendar. Use `smoothScrollToDate()` to get a smooth scrolling animation. @@ -493,7 +493,7 @@ All the respective XML attributes listed above are also available as properties - **updateWeekData()**: Update the calendar's start date or end date or the first day of week after the initial setup. The currently visible week is preserved. The calendar can handle really large date ranges so you may want to setup the calendar with a large date range instead of updating the range frequently. -**`YearCalendarView` methods:** +**`YearCalendarView`** - **scrollToDate(date: LocalDate)**: Scroll to a specific date on the calendar. Use `smoothScrollToDate()` to get a smooth scrolling animation.