NepaliDateRangePickerWithEnglishDate

fun NepaliDateRangePickerWithEnglishDate(state: NepaliDateRangePickerState, modifier: Modifier = Modifier, englishDateLocale: NepaliDateLocale = NepaliDatePickerDefaults.DefaultLocale, title: @Composable () -> Unit? = { NepaliDatePickerDefaults.NepaliDateRangePickerTitle( modifier = Modifier.padding(NepaliDateRangePickerTitlePadding), language = state.locale.language, displayMode = state.displayMode, calendarSystem = state.displayedCalendarSystem ) }, headline: @Composable () -> Unit? = { NepaliDatePickerDefaults.NepaliDateRangePickerHeadlineWithEnglishDate( modifier = Modifier.padding(NepaliEnglishDateRangePickerHeadlinePadding), selectedNepaliStartDate = state.selectedStartNepaliDate, selectedNepaliEndDate = state.selectedEndNepaliDate, selectedEnglishStartDate = state.selectedStartEnglishDate, selectedEnglishEndDate = state.selectedEndEnglishDate, englishLocale = englishDateLocale, locale = state.locale, calendarSystem = state.displayedCalendarSystem ) }, showModeToggle: Boolean = true, showTodayButton: Boolean = true, showMonthsVertically: Boolean = true, showYearPickerAndMonthNavigation: Boolean = true, showCalendarSystemToggle: Boolean = false, showAdjacentMonthDays: Boolean = false, colors: NepaliDatePickerColors = NepaliDatePickerDefaults.colors(), dayDecorator: NepaliDayDecorator? = null)(source)

NepaliDateRangePickerWithEnglishDate let people select a range of Nepali dates and can be embedded into dialogs. See NepaliDatePickerDialog

Nepali date picker lets you pick Nepali dates via a calendar UI which displays both Nepali and English dates.

This is NepaliDateRangePicker with its secondary date always on. Reach for NepaliDateRangePicker with secondaryDateLocale directly when you also want the B.S. / A.D. switch, or want the pairing to be conditional.

Parameters

state

state of the Nepali date range picker. See rememberNepaliDateRangePickerState.

modifier

the Modifier to be applied to this Nepali date range picker.

englishDateLocale

the locale NepaliDateLocale for the english date

title

the title to be displayed in the Nepali date range picker

headline

the headline to be displayed in the Nepali date range picker

showModeToggle

the boolean to let user toggle between Date Picker and Date Input

showTodayButton

the control to either show or hide TODAY button for navigating to today's date. It is also affected by showYearPickerAndMonthNavigation.

showMonthsVertically

the control to either show months vertically or horizontally. Note: When set to true (vertical display), the date picker uses vertical scrolling. This can lead to runtime errors if placed within a composable that also uses vertical scrolling, such as a Column with vertical scroll or a LazyColumn. Ensure your layout accommodates the vertical scrolling behavior to avoid these errors.

showYearPickerAndMonthNavigation

the control to either show or hide YearPicker button and MonthNavigation buttons. showTodayButton is affected by this.

showCalendarSystemToggle

the boolean to show the B.S. / A.D. switch, which drives NepaliDateRangePickerState.displayedCalendarSystem. It sits at the end of the title, so it is independent of showYearPickerAndMonthNavigation.

showAdjacentMonthDays

the boolean to fill each month's empty cells with the neighbouring months' days, drawn faded. Tapping one selects that day as the range's start or end and moves the grid to its month.

colors

NepaliDatePickerColors that will be used to resolve the colors used for this date picker in different states. See NepaliDatePickerDefaults.colors.

dayDecorator

marks days that carry a holiday, a festival or an app's own event, with dots under the day number and a color for the number itself. null, the default, leaves every day as the theme draws it. See NepaliDatePickerDefaults.eventDecorator and NepaliDatePickerDefaults.dayDecorator.

Example usage:

val defaultNepaliDateRangePickerState = rememberNepaliDateRangePickerState()

NepaliDateRangePickerWithEnglishDate(defaultNepaliDateRangePickerState)

See also