public static interface DatePicker.ValueChangedListener
You must override the onValueChanged(ohos.agp.components.DatePicker, int, int, int) method in this class to listen for and process
date changed events of a DatePicker item.
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
onValueChanged(DatePicker component,
int year,
int monthOfYear,
int dayOfMonth) |
Processes date changed events of a date picker.
|
void onValueChanged(DatePicker component, int year, int monthOfYear, int dayOfMonth)
This method is invoked upon a date changed event triggered by DatePicker. It
passes the latest date to process date changed events.
component - Indicates the component (a DatePicker instance) associated with the listener.year - Indicates the year (0 or greater) set by the user.monthOfYear - Indicates the month (1 to 12) set by the user.dayOfMonth - Indicates the day (1 to the total days in the month) set by the user.