NepaliDatePickerWithEnglishDate

fun NepaliDatePickerWithEnglishDate(state: NepaliDatePickerState, modifier: Modifier = Modifier, englishDateLocale: NepaliDateLocale = NepaliDatePickerDefaults.DefaultLocale, title: @Composable () -> Unit? = { NepaliDatePickerDefaults.NepaliDatePickerTitle( modifier = Modifier.padding(NepaliDatePickerTitlePadding), language = state.locale.language, displayMode = state.displayMode, calendarSystem = state.displayedCalendarSystem ) }, headline: @Composable () -> Unit? = { NepaliDatePickerDefaults.NepaliDatePickerHeadlineWithEnglishDate( modifier = Modifier.padding(NepaliDatePickerHeadlinePadding), selectedDate = state.selectedDate, selectedEnglishDate = state.selectedEnglishDate, locale = state.locale, englishLocale = englishDateLocale, displayMode = state.displayMode, calendarSystem = state.displayedCalendarSystem ) }, showModeToggle: Boolean = true, showTodayButton: Boolean = true, showCalendarSystemToggle: Boolean = false, showAdjacentMonthDays: Boolean = false, colors: NepaliDatePickerColors = NepaliDatePickerDefaults.colors(), dayDecorator: NepaliDayDecorator? = null)(source)

NepaliDatePickerWithEnglishDate lets user select a date and preferably should be embedded into Dialogs. Check NepaliDatePickerDialog.

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

This is NepaliDatePicker with its secondary date always on. Reach for NepaliDatePicker 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 date picker. See rememberNepaliDatePickerState.

modifier

the Modifier to be applied to this date picker

englishDateLocale

the locale NepaliDateLocale for the english date

title

the title to be displayed in the date picker

headline

the headline to be displayed in the date picker

showModeToggle

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

showTodayButton

the boolean to control either to show TODAY button or not

showCalendarSystemToggle

the boolean to show the B.S. / A.D. switch, which drives NepaliDatePickerState.displayedCalendarSystem

showAdjacentMonthDays

the boolean to fill the grid's empty cells with the neighbouring months' days, drawn faded. Tapping one selects that day 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 defaultNepaliDatePickerState = rememberNepaliDatePickerState()

NepaliDatePickerWithEnglishDate(state = defaultNepaliDatePickerState)

See also