Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display date picker for android with only month and year fields?

Tags:

i want to disable the day selection option on the android sdk date picker. any easy xml configuration would be the best

like image 421
carbonr Avatar asked Nov 08 '10 10:11

carbonr


People also ask

Is date picker dialog class available in Android?

Android Date Picker allows you to select the date consisting of day, month and year in your custom user interface. For this functionality android provides DatePicker and DatePickerDialog components.

What is time and date picker in Android?

Android provides controls for the user to pick a time or pick a date as ready-to-use dialogs. Each picker provides controls for selecting each part of the time (hour, minute, AM/PM) or date (month, day, year).

How can we get the current date using DatePicker in Android?

And to get current Date, use method getInstance() of Calendar class. Calendar cal = Calendar. getInstance(); mYear = cal.


1 Answers

I just have released a new date picker framework which allows you to create custom date picker. I also provided some example date pickers like the one you are looking for. Hope, that it works for you.

the code can be found here: https://github.com/bendemboski/DateSlider

UPDATE 06/2014: This library was developed 2010 and has been unmaintained since 2011. So it is most likely out of date by now.

like image 164
Daniel Avatar answered Oct 02 '22 20:10

Daniel