-
Notifications
You must be signed in to change notification settings - Fork 169
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
feat: configurable DateRange presets #1924
Conversation
🦋 Changeset detectedLatest commit: 3cd1ad3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for next-docs-evidence ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for evidence-development-workspace ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Hey @AyushAgrawal-A2 thanks for this, after looking at some of the other requests coming in around the date picker, my preference is to do something string based, rather than exposing the underlying date functions themselves. I think with a large list of presets, the option to exclude presets, the option to set a default, and potentially options for start and end dates we'll be able to cover most cases, and keep the API consistent with the mostly string based options we have in other components. E.g. I'm going to close this for now. |
@mcrascal |
Description
closes #1855
closes #1909
Changes:
presetsFn
prop inDateRange
component. This is callback function to generate custom presets.presetsFn
in Docs. Docs LinkdefaultValue
prop name in docs.Checklist