我没有在我的 datePickerDialog 中获得当前日期。总是 x.xx.1900 :/
这是我的代码:
Calendar c = Calendar.getInstance();
c.setTimeInMillis(System.currentTimeMillis());
int y = c.get(Calendar.YEAR);
int m = c.get(Calendar.MONTH);
int d = c.get(Calendar.DAY_OF_MONTH + Calendar.DAY_OF_WEEK);
return new DatePickerDialog(getActivity(),this,d,m,y);
和:
DialogFragment datePicker = new DateFragment();
datePicker.show(getSupportFragmentManager(), "datePicker");