1

How to set the date on a button using DatePicker Dialog?

view story
linux-howto

http://stackoverflow.com – I have a selectDate button and onClicking the button a DatePickerDialog which implements DatePickerDialog.OnDateSetListener is created. On selecting a date, I want to set the selected date on the selectDate button (for eg: 12/12/2012 instead of "Select Date"). I tried passing the id of the button like below code during onClick and set the date inside the onDateSet() method. But itsn't working. Any help? public void showDatePickerDialog(View v) { DialogFragment newFragment = new DatePickerFragment(); Bundle bundle = new Bundle(); Button date = (Button) v; bundle.putString("date (HowTos)