Stay organized with collections
Save and categorize content based on your preferences.
DatePickerDialog.OnDateSetListener
public
static
interface
DatePickerDialog.OnDateSetListener
android.app.DatePickerDialog.OnDateSetListener
|
The listener used to indicate the user has finished selecting a date.
Summary
Public methods
public abstract void onDateSet (DatePicker view,
int year,
int month,
int dayOfMonth)
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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# DatePickerDialog.OnDateSetListener\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nDatePickerDialog.OnDateSetListener\n==================================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/app/DatePickerDialog.OnDateSetListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nDatePickerDialog.OnDateSetListener\n`\n\n\n`\n\n\n`\n\n|------------------------------------------------|\n| android.app.DatePickerDialog.OnDateSetListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nThe listener used to indicate the user has finished selecting a date.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onDateSet](/reference/android/app/DatePickerDialog.OnDateSetListener#onDateSet(android.widget.DatePicker,%20int,%20int,%20int))`(`[DatePicker](/reference/android/widget/DatePicker)` view, int year, int month, int dayOfMonth) ` |\n\nPublic methods\n--------------\n\n### onDateSet\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onDateSet (DatePicker view, \n int year, \n int month, \n int dayOfMonth)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------------|----------------------------------------------------------------------------------------------------------------------|\n| `view` | `DatePicker`: the picker associated with the dialog \u003cbr /\u003e |\n| `year` | `int`: the selected year \u003cbr /\u003e |\n| `month` | `int`: the selected month (0-11 for compatibility with [Calendar.MONTH](/reference/java/util/Calendar#MONTH)) \u003cbr /\u003e |\n| `dayOfMonth` | `int`: the selected day of the month (1-31, depending on month) \u003cbr /\u003e |"]]