Change in one datepicker reflects to other datepicker in an activity
<p>My activity has 3 datepickers. When I click on the 1st datepicker and make changes, it gets reflected to the other datepickers. But every datepicker should be showing the current date when I click on it.</p>

<p>When I select the date 23-07-1993 on the 1st datepicker and set it in the edittext, and I then click on the 2nd datepicker it is showing date 23-07-1993.Thus the change I made in the 1st picker reflects here. </p>

<p>What I want is that every time when I click on the datepicker it should show the current date it should not reflect the changes of other pickers.</p>

<p>My .java class is ,</p>

<pre><code>  private void setDateOfBirth() {
  DatePickerDialog.OnDateSetListener dateOfBirth = new DatePickerDialog.OnDateSetListener() {
           @Override
           public void onDateSet(DatePicker view, int year, int monthOfYear,int dayOfMonth) {
             calendar.set(Calendar.YEAR, year);
             calendar.set(Calendar.MONTH, monthOfYear);
             calendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);
             updateDateOfBirth();
           }//onDateSet

           private void updateDateOfBirth() {
              String myFormat = "yyyy-MM-dd"; //In which you need put here
              SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.US);
              date_of_birth = sdf.format(calendar.getTime());
              Log.d("date_of_birth",date_of_birth);
              edittext_dateOfBirth.setText(date_of_birth);
           }//updateRenewalDate
    };//DatePickerDialog
}

private void setJoinDate() {
DatePickerDialog.OnDateSetListener joinDate = new DatePickerDialog.OnDateSetListener() {
           @Override
           public void onDateSet(DatePicker view, int year, int monthOfYear,int dayOfMonth) {
             calendar.set(Calendar.YEAR, year);
             calendar.set(Calendar.MONTH, monthOfYear);
             calendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);
             updateJoinDate();
           }//onDateSet

           private void updateJoinDate() {
              String myFormat = "yyyy-MM-dd"; //In which you need put here
              SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.US);
              join_date = sdf.format(calendar.getTime());
              Log.d("join_date",join_date);
              edittext_joinDate.setText(join_date);
           }//updateJoinDate
        };//DatePickerDialog
}
</code></pre>
