setup
fun setup(buttonToday: @Composable (enabled: Boolean, onClick: () -> Unit) -> Unit? = { enabled, onClick ->
OutlinedButton(
onClick = onClick,
enabled = enabled
) {
Text(text = stringResource(Res.string.composedialogs_date_today))
}
}, firstDayOfWeek: DayOfWeek = DayOfWeek.MONDAY, formatterWeekDayLabel: (dayOfWeek: DayOfWeek) -> String = {
defaultFormatterWeekDayLabel(it)
}, formatterSelectedDate: (date: LocalDate) -> String = {
defaultFormatterSelectedDate(it)
}, formatterSelectedMonth: (month: Month) -> String = {
defaultFormatterSelectedMonth(it)
}, formatterSelectedYear: (year: Int) -> String = { it.toString() }, formatterMonthSelectorList: (month: Month) -> String = {
defaultFormatterSelectedMonthInSelectorList(it)
}, formatterYearSelectorList: (year: Int) -> String = { it.toString() }, dateCellHeight: Dp = 48.dp, showNextPreviousMonthButtons: Boolean = true, showNextPreviousYearButtons: Boolean = true): DialogDate.Setup
Return
a DialogDateSetup
Parameters
buttonToday
the optional today button that is displayed at top next to the selected date
firstDayOfWeek
the first day of the week (use DayOfWeek.MONDAY to DayOfWeek.SUNDAY)
formatterWeekDayLabel
the date format for the weekday names of the calendar
formatterSelectedDate
the date format for the text that represents the currently selected date
formatterSelectedMonth
the date format for the current month text
formatterSelectedYear
the date format for the current year text
formatterMonthSelectorList
the date format for the list in which you can select a month
formatterYearSelectorList
the date format for the list in which you can select a year
dateCellHeight
the height of cell representing a single day
showNextPreviousMonthButtons
if true, the decrease/increase buttons next to the select month are shown
showNextPreviousYearButtons
if true, the decrease/increase buttons next to the select year are shown