NepaliDateFieldViewController

fun NepaliDateFieldViewController(initialValue: SimpleDate?, locale: NepaliDateLocale, dateFormat: NepaliDateFormatter.Pattern, yearRangeStart: Int, yearRangeEnd: Int, selectableDates: NepaliSelectableDates?, options: NepaliFieldOptions?, events: NepaliEventOptions?, onHeightChange: (Float) -> Unit, onValueChange: (SimpleDate?) -> Unit): UIViewController(source)

Hosts a single typed date entry field.

options.outlined picks NepaliDateTextField when true and the filled NepaliDateField when false. The controller owns the field contents, so Swift only observes them through onValueChange.

Parameters

initialValue

date the field opens with, or null for empty.

locale

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

dateFormat

digit layout the user types into, for example YYYY_SLASH_MM_SLASH_DD.

yearRangeStart

first Bikram Sambat year accepted.

yearRangeEnd

last Bikram Sambat year accepted.

selectableDates

policy deciding which dates are valid, or null to accept every date.

options

appearance and behaviour knobs, or null for the library defaults.

onHeightChange

receives the content height in points, so the caller can size its frame.

onValueChange

invoked whenever the field parses to a new value, or to null while the entry is incomplete.