I want to set the custom date on caleder.present i am showing the current date,now i want to show the existing date.how to set custom date on calender?
I am using the following code.
DatePickerDialog dpd = new DatePickerDialog(getActivity(),
new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {
Calendar c = Calendar.getInstance();
c.set(Calendar.YEAR, year);
c.set(Calendar.MONTH, monthOfYear);
c.set(Calendar.DAY_OF_MONTH, dayOfMonth);
}
}, year, month, year);
dpd.getDatePicker().setMinDate(System.currentTimeMillis());
dpd.show();