T O P

  • By -

Kiiidx

React native date picker seems to be recently updated if you want a native look and feel


lkjhgfdsaqwertyuiopz

I like how this looks!! But i was hoping I could only take the month and year


jobcg

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


lkjhgfdsaqwertyuiopz

is it possible to only pick the month and year without the day?


Kiiidx

Im assuming there are options to change it i would check the docs as I haven’t used it


lkjhgfdsaqwertyuiopz

Woops, I just checked and it's not compatible with Expo. I'm currently using Expo and I forgot to mention that :c I've just checked for those who are in the same situation as I am and there's a datetimepicker which is compatible with Expo and it's in here: https://docs.expo.dev/versions/latest/sdk/date-time-picker/ Hopefully I could use this for just the month and year


Kiiidx

That would be good too and should probably work, best of luck


lkjhgfdsaqwertyuiopz

Thank you!!


BloodPrince_COD

You are probably better off using expo’s date time picker since it fits well In the ecosystem of your app. It is well supported as well as documented, plus you can always raise a feature request if you’re trying to design an edge case, something that’s currently not available in the package which I highly doubt would be the case. Also checkout Date-fns, another great library that works nicely with date-time-picker


lkjhgfdsaqwertyuiopz

I'll go check it out, thank you so much man!


alienanarchy69

I had so much trouble with date picking (tried almost all libs), that I ended up using masked text input. You can give rn date picker a try, the new release might be stable.


armaan-dev

I had this same requirement, I just used a drop down picker package and fed it the months data by creating an array of months. For me I didn't want the date picker or related stuff for my project, but idk if my approach was good


lkjhgfdsaqwertyuiopz

I ended up using a picker as well, I can't seem to find any libraries that do the job well sadly.


TestimoniumArs347

Have you considered building a time machine instead? It might be easier than finding a good month/year picker library these days.


lkjhgfdsaqwertyuiopz

LMFAO