title: problems with date picker in an android app
body: <p>hi i my app i have placed two edit text boxes, when i touch on it the date picker dialog box gets appeared.</p>
  
  <p>Now the problem is when i touch the first edit box the dialog opens and after setting it displays at the EditText1. Then when i touch the second edit box the dialog opens and after setting some other date, it is not displayed in EditText2, instead it is show in the EditText1 and the former date gets changed</p>
  
  <p>I want the dates to be displayed in respective boxes.</p>
  
  <p>The following is my code</p>
  
  <pre><code>{
      et1 =(EditText)findViewById(R.id.widget29);
      et1.setHint("DOB");
      et2 =(EditText)findViewById(R.id.widget32);
      et2.setHint("DOF");
  
      et1.setOnClickListener(new View.OnClickListener()
      {
          @Override
          public void onClick(View v)
          {
              showDialog(DATE_DIALOG_ID);
          }
      });
  
      et2.setOnClickListener(new View.OnClickListener()
      {
          @Override
          public void onClick(View v)
          {
              showDialog(DATE_DIALOG_ID);
          }
      });
  
  
   // get the current date
      final Calendar c = Calendar.getInstance();
      mYear = c.get(Calendar.YEAR);
      mMonth = c.get(Calendar.MONTH);
      mDay = c.get(Calendar.DAY_OF_MONTH);
  
  }
  
  
  private void updateDisplay()
  {
      this.et1.setText(
              new StringBuilder()
                      // Month is 0 based so add 1
                      .append(mMonth + 1).append("-")
                      .append(mDay).append("-")
                      .append(mYear).append("-"));
  }
  
  
  private void updateDisplay1()
  {
      this.et2.setText(
          new StringBuilder()
                  // Month is 0 based so add 1
                  .append(mMonth + 1).append("-")
                  .append(mDay).append("-")
                  .append(mYear).append("-"));
  }
  
  private DatePickerDialog.OnDateSetListener mDateSetListener = new DatePickerDialog.OnDateSetListener()
      {
          public void onDateSet(DatePicker view, int year,int monthOfYear, int dayOfMonth) 
          {
              mYear = year;
              mMonth = monthOfYear;
              mDay = dayOfMonth;
              updateDisplay();
          }
      };
  
  
  
      private DatePickerDialog.OnDateSetListener mDateSetListener1 = new DatePickerDialog.OnDateSetListener()
      {
          public void onDateSet(DatePicker view, int year,
                                int monthOfYear, int dayOfMonth) {
              mYear = year;
              mMonth = monthOfYear;
              mDay = dayOfMonth;
              updateDisplay1();
          }
      };
  
      @Override
      protected Dialog onCreateDialog(int id) 
      {
         switch (id) 
         {
            case DATE_DIALOG_ID:
            return new DatePickerDialog(this, mDateSetListener, mYear, mMonth, mDay);
         }
         return null;
      }
  }
  </code></pre>
  
  <p>the following are some more problems i am facing here,</p>
  
  <ol>
  <li><p>Whenever i touch the edit text box the keyboard also gets opened how to hide the keyboard</p></li>
  <li><p>in the EditText box i want the order to be viewed as Year/Month/Date</p></li>
  <li><p>Is there any way to change the date picker dialog box as the below figure</p></li>
  </ol>
  
  <p><img src="https://i.stack.imgur.com/w5U2V.png" alt="enter image description here"> </p>
  
  <p>please help me in this</p>