title: How can I use a datepicker to set a reminder on a specific date?
body: <p>I have a datepicker which can be used to pick a date and set it to a edittext. how can i  set a reminder on the date ?.</p>
  
  <p>The program for setting a edittext from the date picker is given below:</p>
  
  <pre><code>import android.app.DatePickerDialog;
  import android.content.DialogInterface; 
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.DatePicker;
  import android.widget.EditText;
  
  import java.text.SimpleDateFormat;
  import java.util.Calendar;
  import java.util.Date;
  import java.util.Locale;
  
  public class MainActivity extends AppCompatActivity {
  
     Calendar myCalendar= Calendar.getInstance();
     private EditText et;
     @Override
     protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        et =(EditText)findViewById(R.id.editText3);
      }
  
    DatePickerDialog.OnDateSetListener date =new 
    DatePickerDialog.OnDateSetListener(){
       @Override
       public void onDateSet(DatePicker view, int year, int monthOfYear,
                             int dayOfMonth) {
           // TODO Auto-generated method stub
           myCalendar.set(Calendar.YEAR, year);
           myCalendar.set(Calendar.MONTH, monthOfYear);
           myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);
           updateLabel();
       }
   };
  
   public void onClick(View v) {
       // TODO Auto-generated method stub
       new DatePickerDialog(MainActivity.this, date, myCalendar
               .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),
               myCalendar.get(Calendar.DAY_OF_MONTH)).show();
  
   }
  
  
  
   private void updateLabel() {
  
       String myFormat = "MM/dd/yy"; //In which you need put here
       SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.US);
  
       et.setText(sdf.format(myCalendar.getTime()));
    }
  }
  </code></pre>