datetimepicker icon indicating copy to clipboard operation
datetimepicker copied to clipboard

Is it possible to make a date picker only with month and year?

Open aidshon opened this issue 7 years ago • 12 comments

photo_2019-09-04_17-03-55

aidshon avatar Sep 05 '19 03:09 aidshon

Yes, even only with the year!

Martian2Lee avatar Sep 19 '19 16:09 Martian2Lee

How? I'm not seeing any example , not changing when experimenting on the mode too.

sameersitre avatar Oct 23 '19 18:10 sameersitre

If someone can throw an example, in a comment, it would be of great help :D

AndiCrisan avatar Nov 05 '19 11:11 AndiCrisan

Yes, even only with the year!

I couldn't see any config for this. Can you share me the details.

hai2san avatar Nov 07 '19 07:11 hai2san

Anyone has found a solution for this? @Martian2Lee could you give us an example.

anthonnyc2 avatar Nov 07 '19 13:11 anthonnyc2

@aidshon use https://github.com/vinodkumar8/react-native-month-selector

wisquimas avatar Nov 27 '19 18:11 wisquimas

I think Martin is asking if it's possible to only see the years. He doesn't have a solution.

Thembelani avatar Dec 10 '19 09:12 Thembelani

I would love to have this feature. For the project I am working on only month and year are required and the day is actually a bit of a UX hurdle for our users. I can't seem to find any quality date picker for month and year only and have an easy way to quickly jump years ahead.

dquessenberry avatar Dec 13 '19 20:12 dquessenberry

I would love to have this feature. For the project I am working on only month and year are required and the day is actually a bit of a UX hurdle for our users. I can't seem to find any quality date picker for month and year only and have an easy way to quickly jump years ahead.

Did you happen to find any?

pranjaljately avatar Jan 17 '20 00:01 pranjaljately

According to SO this is not possible with UIDatePicker so I'm not planning to implement this. Workaround can be bridging some 3rd part picker to React Native, or create two pickers, one for year and one for month.

vonovak avatar Jan 30 '20 22:01 vonovak

try this package https://www.npmjs.com/package/react-native-month-year-picker

RayyanNafees avatar Jan 28 '22 11:01 RayyanNafees

try this package https://www.npmjs.com/package/react-native-month-year-picker

I tried this but not working show this error

Failed to resolve dependency 'react-native-month-year-picker@*' (Invalid module ./MonthPicker - Module not found: Error: Can't resolve './MonthPicker' in '/tmp/snackager/snackager/buildStatus/1/[email protected],android,web/package/src')

raiabdullahbashir avatar Aug 07 '22 23:08 raiabdullahbashir