Stay organized with collections
Save and categorize content based on your preferences.
CalendarView.OnDateChangeListener
public
static
interface
CalendarView.OnDateChangeListener
android.widget.CalendarView.OnDateChangeListener
|
The callback used to indicate the user changes the date.
Summary
Public methods
public abstract void onSelectedDayChange (CalendarView view,
int year,
int month,
int dayOfMonth)
Called upon change of the selected day.
Parameters |
view |
CalendarView : The view associated with this listener.
This value cannot be null . |
year |
int : The year that was set. |
month |
int : The month that was set [0-11]. |
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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# CalendarView.OnDateChangeListener\n\nAdded in [API level 11](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nCalendarView.OnDateChangeListener\n=================================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/widget/CalendarView.OnDateChangeListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nCalendarView.OnDateChangeListener\n`\n\n\n`\n\n\n`\n\n|--------------------------------------------------|\n| android.widget.CalendarView.OnDateChangeListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nThe callback used to indicate the user changes the date.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onSelectedDayChange](/reference/android/widget/CalendarView.OnDateChangeListener#onSelectedDayChange(android.widget.CalendarView,%20int,%20int,%20int))`(`[CalendarView](/reference/android/widget/CalendarView)` view, int year, int month, int dayOfMonth) ` Called upon change of the selected day. |\n\nPublic methods\n--------------\n\n### onSelectedDayChange\n\nAdded in [API level 11](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onSelectedDayChange (CalendarView view, \n int year, \n int month, \n int dayOfMonth)\n```\n\nCalled upon change of the selected day.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------------|---------------------------------------------------------------------------------------------|\n| `view` | `CalendarView`: The view associated with this listener. This value cannot be `null`. \u003cbr /\u003e |\n| `year` | `int`: The year that was set. \u003cbr /\u003e |\n| `month` | `int`: The month that was set \\[0-11\\]. \u003cbr /\u003e |\n| `dayOfMonth` | `int`: The day of the month that was set. \u003cbr /\u003e |"]]