Constructor fo DatePickerDialog
takes DatePickerDialog.OnDateSetListener
as second parameter, so maybe you should implement that interface in your parent activity EditSessionActivity
(not in DatePickerFragment
) and change this line:
return new DatePickerDialog(getActivity(), this, year, month, day);
into this:
return new DatePickerDialog(getActivity(), (EditSessionActivity)getActivity(), year, month, day);
And then your activity should looks like this:
public class EditSessionActivity extends FragmentActivity implements
DatePickerDialog.OnDateSetListener{
public void onDateSet(DatePicker view, int year, int month, int day) {
//use date in your activity
}
...
}