0

I have tried the DatePickerDialog, but there I was given options to select day, month and year.

DatePickerDialog dialog= new DatePickerDialog(this, dateSetListener, 2015, 11, 1);
dialog.show();

private DatePickerDialog.OnDateSetListener dateSetListener =
        new DatePickerDialog.OnDateSetListener() {
    public void onDateSet(DatePicker view, int year, 
            int monthOfYear, int dayOfMonth) {
        //  Do task
    }
};

But I want to pop up a dialog on click of button for the selection of day only, from 1 to 31 in calender view format and capture the day value on Onclick. I am not able to find any solution on this one. Dialog will look something like this..

enter image description here

OnePunchMan
  • 720
  • 15
  • 33

1 Answers1

0

Try the following piece of code..

DatePickerDialog dialog = new DatePickerDialog(getActivity(),android.R.style.Theme_Holo_Dialog_MinWidth, this, year, month, day);