How to used datepicker dialogdragment different edittext
<p>I have DatepickerFragment which extends from DialogFragment. In my main fragment there are two edittext.The first one is for starting date and the second is for finising date. These are for some user operations.User clicks first edittext choose date and the other one is same way But i confused about how to handle edittexts on DatepickerFragment.What is best way for it ? </p>

<pre><code>    etOverFlowingStaringDate.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {

            FragmentManager fragmentManager = getActivity().getFragmentManager();
            DatePickerFragment datePickerFragment = new DatePickerFragment();
            datePickerFragment.show(fragmentManager, "datepicker");
        }
    });
</code></pre>

<p>DatepickerFragment.java</p>

<pre><code>public class DatePickerFragment extends DialogFragment implements DatePickerDialog.OnDateSetListener {

    @Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        // Use the current date as the default date in the picker
        final Calendar c = Calendar.getInstance();
        int year = c.get(Calendar.YEAR);
        int month = c.get(Calendar.MONTH);
        int day = c.get(Calendar.DAY_OF_MONTH);

        // Create a new instance of DatePickerDialog and return it
        return new DatePickerDialog(getActivity(), this, year, month, day);
    }

    @Override
    public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {
        populateSetDate(year, monthOfYear+1, dayOfMonth);
    }

    private void populateSetDate(int year, int month, int dayOfMonth) {

       String datetime = dayOfMonth + "/" + month + "/" + year ;

        //EditText edtext = (EditText)getView().findViewById(R.id.overflow_starting_date);
        // The edittext is changable it is not a good way to define in here

    }
}
</code></pre>