I'm relatively new to react as well as GitHub, and need some assistance using the year selection functionality on react-dates.
I have used react-dates on a dummy project I made following a course on Udemy, and dd not need that functionality. I've followed up on #25 and #1106 but I wasn't really able to grasp the implementation part.
I'm an intern and the current project I'm a part of, requires that functionality to be added. Could someone please walk me through the use of react-dates in my basic application, say, a form, from importing, to passing the props, to rendering captions and all. Any help would be appreciated. I'm not sure if I should have posted this as an Issue, so if that was not supposed to be done, please excuse me, and kindly move this to wherever this question should be. I'm sorry if this shouldn't have happened.
I have attached the screenshot of how it currently looks to me.
Thanks in advance!
Did you solve this? I'm having the same issue.
@Henriklimseth I did, I was trying to use renderCaption but that didn't seem to work, as renderMonthElement is what is the correct custom caption rendering prop now. I looked up how to render custom captions on react-dates and found this link:
https://stackoverflow.com/questions/52357815/how-to-add-a-select-for-a-year-in-react-dates
Try reading up and you'll able to implement it.
@swaritkohli Thank you so much, this solved it for me as well!
Most helpful comment
@Henriklimseth I did, I was trying to use renderCaption but that didn't seem to work, as renderMonthElement is what is the correct custom caption rendering prop now. I looked up how to render custom captions on react-dates and found this link:
https://stackoverflow.com/questions/52357815/how-to-add-a-select-for-a-year-in-react-dates
Try reading up and you'll able to implement it.