Hide Year field in Android DatePicker?

前端 未结 5 584
梦毁少年i
梦毁少年i 2020-12-15 22:41

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

5条回答
  •  -上瘾入骨i
    2020-12-15 23:30

    Recently managed to hide the year part of the dialog by setting the datepicker width too small.

    
    

    Let me know if this works, obviously, there is an accessible year in the binding but you can just not pick that up when calculating the date.

提交回复
热议问题