NepaliDatePickerDialogViewController

fun NepaliDatePickerDialogViewController(initialSelectedDate: SimpleDate?, locale: NepaliDateLocale, yearRangeStart: Int, yearRangeEnd: Int, selectableDates: NepaliSelectableDates?, calendarOptions: NepaliCalendarOptions?, options: NepaliDialogOptions?, events: NepaliEventOptions?, onHeightChange: (Float) -> Unit, onConfirm: (CustomCalendar?) -> Unit, onDismiss: () -> Unit): UIViewController(source)

Hosts NepaliDatePickerDialog with a calendar inside it.

The controller renders the dialog immediately and stays transparent behind it, so add it over the app's own content from Swift (a SwiftUI overlay works well) and remove it when onDismiss fires. Do not wrap it in a sheet or a fullScreenCover, which would close out of step with the dialog.

Parameters

initialSelectedDate

date selected when the dialog opens, or null for no selection.

locale

language, date format and digit script the dialog renders with.

yearRangeStart

first Bikram Sambat year the picker allows.

yearRangeEnd

last Bikram Sambat year the picker allows.

selectableDates

policy deciding which dates are enabled, or null to allow every date.

calendarOptions

knobs for the calendar inside the dialog, or null for the defaults.

options

dialog chrome, or null for the defaults.

onHeightChange

receives the content height in points. A dialog is an overlay, so this reports the inline content only and is normally ignored.

onConfirm

invoked with the selection when the confirming button is tapped.

onDismiss

invoked when the dialog is dismissed without confirming.