-
-
Notifications
You must be signed in to change notification settings - Fork 233
feat(datepicker): added onPageChange callback #2881
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
base: main
Are you sure you want to change the base?
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Thanks for contributing this. I was wondering if there was an alternative name to “onPageChange”, given the word “page” doesn’t feel intuitive for a date picker. Wondering if “onNavigate” or a combo of “onPrevTriggerClick” + “onNextTriggerClick” would work. |
Do you want me to rename it to |
|
@segunadebayo Did you make a decision? zag/packages/machines/date-picker/src/date-picker.machine.ts Lines 9 to 13 in 3dbfe4a
It also makes sense in terms of a physical calendar with pages |
|
Yes, you might be right @IvanKalinin I was wondering if it's better to attach the The name can be misleading since there might be more scenarios where users might want |
📝 Description
Added
onPageChangecallback to datepicker api. Useful to determine the current month after clicking next/previous trigger and, for example, load events or different data based on the current calendar page/month.⛳️ Current behavior (updates)
N/A
🚀 New behavior
Triggers
onPageChangecallback on clicking next/previous trigger💣 Is this a breaking change (Yes/No):
No
📝 Additional Information
N/A