facing problem with date picker in android
<p>in my application i have to date picker as From date and To date. I am using onCreateDialog() method. So first time i am selecting the dates from date picker and putting them in the edit text. then when again i am selecting the date from the date picker, in the date picker it is showing the date which i already selected. But if i move to other search in the same screen(Activity) and try to pick the date from date picker, date picker still is showing the previous date. not the current date.</p>

<pre><code>protected Dialog onCreateDialog(int id) {
    final Calendar c = Calendar.getInstance();
    switch (id) {
    case DATE_DIALOG_ID1:
        return new DatePickerDialog(this, mDateSetListener,  c.get(Calendar.YEAR),
                c.get(Calendar.MONTH),  c.get(Calendar.DAY_OF_MONTH));


    case DATE_DIALOG_ID2:
        return new DatePickerDialog(this, mDateSetListener2,  c.get(Calendar.YEAR),
                c.get(Calendar.MONTH),  c.get(Calendar.DAY_OF_MONTH));
    }
    return null;
}
</code></pre>
