Stay organized with collections
Save and categorize content based on your preferences.
DatePicker.OnDateChangedListener
public
static
interface
DatePicker.OnDateChangedListener
android.widget.DatePicker.OnDateChangedListener
|
Known indirect subclasses
|
The callback used to indicate the user changed the date.
Summary
Public methods |
abstract
void
|
onDateChanged(DatePicker view, int year, int monthOfYear, int dayOfMonth)
Called upon a date change.
|
Public methods
public abstract void onDateChanged (DatePicker view,
int year,
int monthOfYear,
int dayOfMonth)
Called upon a date change.
Parameters |
view |
DatePicker : The view associated with this listener. |
year |
int : The year that was set. |
monthOfYear |
int : The month that was set (0-11) for compatibility
with Calendar . |
dayOfMonth |
int : The day of the month that was set. |
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,["# DatePicker.OnDateChangedListener\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: [Methods](#pubmethods) \n\nDatePicker.OnDateChangedListener\n================================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/widget/DatePicker.OnDateChangedListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nDatePicker.OnDateChangedListener\n`\n\n\n`\n\n\n`\n\n|-------------------------------------------------|\n| android.widget.DatePicker.OnDateChangedListener |\n\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known indirect subclasses [DatePickerDialog](/reference/android/app/DatePickerDialog) |-------------------------------------------------------------|-----------------------------------------------------------------------------------| | [DatePickerDialog](/reference/android/app/DatePickerDialog) | A simple dialog containing an [DatePicker](/reference/android/widget/DatePicker). | |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nThe callback used to indicate the user changed the date.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onDateChanged](/reference/android/widget/DatePicker.OnDateChangedListener#onDateChanged(android.widget.DatePicker,%20int,%20int,%20int))`(`[DatePicker](/reference/android/widget/DatePicker)` view, int year, int monthOfYear, int dayOfMonth) ` Called upon a date change. |\n\nPublic methods\n--------------\n\n### onDateChanged\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onDateChanged (DatePicker view, \n int year, \n int monthOfYear, \n int dayOfMonth)\n```\n\nCalled upon a date change.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------------|---------------------------------------------------------------------------------------------------------------|\n| `view` | `DatePicker`: The view associated with this listener. \u003cbr /\u003e |\n| `year` | `int`: The year that was set. \u003cbr /\u003e |\n| `monthOfYear` | `int`: The month that was set (0-11) for compatibility with [Calendar](/reference/java/util/Calendar). \u003cbr /\u003e |\n| `dayOfMonth` | `int`: The day of the month that was set. \u003cbr /\u003e |"]]