Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DatePicker] Callback event(s) for switching month / year #6886

Closed
Airblader opened this issue May 17, 2017 · 3 comments
Closed

[DatePicker] Callback event(s) for switching month / year #6886

Airblader opened this issue May 17, 2017 · 3 comments
Labels
component: date picker This is the name of the generic UI component, not the React module!

Comments

@Airblader
Copy link
Contributor

It'd be great if we had a callback for when the user selects a different month / year without having actually selected a date yet.

Rationale: I'd like to disable dates, but avoid getting one huge JSON response from the backend with dates that are allowed. It'd be easier if I could instead get a list of allowed dates from my backend only for the month currently selected and update this when the user switches to another month.

@oliviertassinari oliviertassinari added the component: date picker This is the name of the generic UI component, not the React module! label May 19, 2017
@eberhara
Copy link

A BIG +1 for this one.

@oliviertassinari
Copy link
Member

Closing for #4787

@sertjerm
Copy link

not good idea but worked for me
i'm using with jquery

import $ from 'jquery'
componentDidMount() { $(".div-my-calendar").find("button:eq(0)").bind("click", () => { console.log('prev') this.onMonthChanged('prev') }) $(".div-my-calendar").find("button:eq(1)").bind("click", () => { console.log('next') this.onMonthChanged('next') }) } onMonthChanged=(v)=>{ console.log("on month changed",v) }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: date picker This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

4 participants