5

i just want to create date picker dialog in which it's show only years option to choose .

Only year option is visible and user pick any year from dialog box .

user2021938
  • 145
  • 1
  • 1
  • 9
  • 1
    Show your code, and what you did. – RossC Jun 30 '14 at 09:53
  • 2
    possible duplicate of [How to display year only in date picker in android](http://stackoverflow.com/questions/10793811/how-to-display-year-only-in-date-picker-in-android) – duggu Jun 30 '14 at 09:53
  • Check this http://www.mkyong.com/android/android-date-picker-example/ – Aniruddha Jun 30 '14 at 09:54
  • @aniruddha simple date picker is created , but i have to show only year option to pick in android ICS . – user2021938 Jun 30 '14 at 09:58
  • This link may help anyone who has the same issue: http://www.geekcodehub.com/2018/05/23/custom-year-picker-in-android/ – DK250 Jul 31 '18 at 06:38

1 Answers1

-2

for this, try number picker instead of datepicker, see below links:

link1

link2

Community
  • 1
  • 1
Pankaj Deshpande
  • 492
  • 1
  • 5
  • 15