dp = (DatePicker) findViewById(R.id.dPicker); dp.init(mYear, mMonth, mDay, new DatePicker.OnDateChangedListener() { @Override public void onDateChanged(DatePicker view, int year, int monthOfYear, int dayOfMonth) { mYear = year; mMonth = monthOfYear; mDay = dayOfMonth; /* 处理业务逻辑 */ } });