I’m using a basic DatePicker and I’m trying to figure out how to hide the Year field on the DatePickerDialog so that only the Month and Day are visible. I don’t mind that the underlying code for the year would still be there, I’d just like to hide the Year Field in the Dialog. You know with something like:
((View) myYear).setVisibility(View.GONE);
which I know doesn’t work because myYear is a int not a View, but something along those lines. Is it possible?
A super easy way that I found to implement a DatePicker is to call it in xml:
and then hide whichever field you want (in this case the year) in java: