I created a DatePickerPreference, i.e. I extended DialogPreference and created a DatePicker object inside and had it working almost perfectly. It changes values when you click t
I had the same issue. The solution is very simple. The date picker updates the edited values only when it losts focus, so before getting the values you have to call:
datePicker.clearFocus();
After this call you can call:
selectedDay = datePicker.getDayOfMonth();
selectedMonth = datePicker.getMonth();
and have the values updated.