arqex / react-datetime

A lightweight but complete datetime picker react component.
2k stars 868 forks source link

Expose view data (year, month) #407

Open ivyyangthl opened 7 years ago

ivyyangthl commented 7 years ago

I'm Submitting a ...

[ ] Bug report
[x] Feature request
[ ] Support request

Steps to Reproduce

We are developing a datetime range picker based on 'react-datetime', could you please expose the view data to outside so we can control '>', '<'? The view data here means the year and month value when user navigates through the datetime picker.

simeg commented 6 years ago

Hi @ivyyangthl. Feel free to submit a PR for this, it should not be too complicated. Look at renderInput for inspiration.

ivyyangthl commented 6 years ago

Looks like @DaanDD code was merged 3 days ago, https://github.com/YouCanBookMe/react-datetime/pull/520, I will try it out. Thanks.

DaanDD commented 6 years ago

@ivyyangthl That PR has not been merged yet. Feel free to refer to my personal repo though, the code works for me. I triggered a build on my personal develop branch so referring to git+https://github.com/DaanDD/react-datetime.git#develop in your package.json should work.

ivyyangthl commented 6 years ago

Thanks @DaanDD. Actually, it's this PR: https://github.com/YouCanBookMe/react-datetime/pull/508. But I guess it's better to wait after fix on https://github.com/YouCanBookMe/react-datetime/pull/520 is merged? I will try your personal repo for now.