Stay organized with collections
Save and categorize content based on your preferences.
OnDateSetListener
interface OnDateSetListener
The listener used to indicate the user has finished selecting a date.
Summary
Public methods |
abstract Unit |
|
Public methods
onDateSet
abstract fun onDateSet(
view: DatePicker!,
year: Int,
month: Int,
dayOfMonth: Int
): Unit
Parameters |
view |
DatePicker!: the picker associated with the dialog |
year |
Int: the selected year |
month |
Int: the selected month (0-11 for compatibility with Calendar.MONTH ) |
dayOfMonth |
Int: the selected day of the month (1-31, depending on month) |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# DatePickerDialog.OnDateSetListener\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nOnDateSetListener\n=================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/app/DatePickerDialog.OnDateSetListener \"View this page in Java\") \n\n```\ninterface OnDateSetListener\n```\n\n|-----------------------------------------------------|\n| [android.app.DatePickerDialog.OnDateSetListener](#) |\n\nThe listener used to indicate the user has finished selecting a date.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onDateSet](#onDateSet(android.widget.DatePicker,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int))`(`view:` `[DatePicker](../widget/DatePicker.html#)!`, `year:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `month:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `dayOfMonth:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` \u003cbr /\u003e |\n\nPublic methods\n--------------\n\n### onDateSet\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onDateSet(\n view: DatePicker!, \n year: Int, \n month: Int, \n dayOfMonth: Int\n): Unit\n```\n\n| Parameters ||\n|--------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `view` | [DatePicker](../widget/DatePicker.html#)!: the picker associated with the dialog |\n| `year` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): the selected year |\n| `month` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): the selected month (0-11 for compatibility with [Calendar.MONTH](../../java/util/Calendar.html#MONTH:kotlin.Int)) |\n| `dayOfMonth` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): the selected day of the month (1-31, depending on month) |"]]