NepaliDateRangePickerState

fun NepaliDateRangePickerState(initialSelectedStartNepaliDate: SimpleDate? = null, initialSelectedEndNepaliDate: SimpleDate? = null, initialDisplayedMonth: SimpleDate? = initialSelectedStartNepaliDate, yearRange: IntRange = NepaliCalendarDefaults.NepaliYearRange, initialDisplayMode: DisplayMode = DisplayMode.Picker, nepaliSelectableDates: NepaliSelectableDates = NepaliDatePickerDefaults.AllDates, locale: NepaliDateLocale): NepaliDateRangePickerState(source)

Creates a NepaliDateRangePickerState. Primarily recommended for outside composition.

You are recommended to use rememberNepaliDateRangePickerState when inside a composition.

Parameters

initialSelectedStartNepaliDate

SimpleDate that represents an initial selection of a Nepali start date. Provide a null to indicate no selection.

initialSelectedEndNepaliDate

SimpleDate that represents an initial selection of a Nepali end date. Provide a null to indicate no selection.

initialDisplayedMonth

SimpleDate that represents an initial selection of a month to be displayed to the user. By default, in case an initialSelectedDate is provided, the initial displayed month would be the month of the selected date. Otherwise, in case null is provided, the displayed month would be the current one.

yearRange

an IntRange that holds the year range that the date picker will be limited to

nepaliSelectableDates

a NepaliSelectableDates that is consulted to check if a date is allowed. In case a date is not allowed to be selected, it will appear disabled in the UI. You can checkout helper functions BeforeDateSelectable, AfterDateSelectable, and DateRangeSelectable in NepaliDateConverter.

locale

an instance of NepaliDateLocale that is used to localize the date picker. It holds the preference for the date picker formatted date and the language of the date picker.

Out-of-range or invalid initial values are coerced rather than rejected: the displayed month is clamped into yearRange, and out-of-range or non-existent initial start/end dates resolve to no selection.

See also