I am not getting current date in my datePickerDialog. Always x.xx.1900 :/
Here is my code:
Calendar c = Calendar.getInstance();
the constructor of DatePickerDialog
is
public DatePickerDialog (Context context, DatePickerDialog.OnDateSetListener callBack, int year, int monthOfYear, int dayOfMonth)
You should use this :
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);
return new DatePickerDialog(getActivity(),this,y,m,d);
Use This to get the The Latest Date
public String getDisplayDate(){
return (dt.getDate()+"/"+(dt.getMonth()+1)+"/"+(dt.getYear()+1900));
}