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

Implement default range for Range Picker #65

Merged
merged 2 commits into from
Apr 11, 2023
Merged

Conversation

t-lock
Copy link
Contributor

@t-lock t-lock commented Apr 4, 2023

Hello.

Thanks for your work on this library, it is one of the best datepickers out there for Svelte right now. However, in my use, I ran into a significant issue where the default date range for range picker is hard-coded to 1 month, rather than being configurable.

This PR exposes the default range as input props, so that this can be configurable.

This also solves issue #43

Usage:

<DatePicker range={true} defaultRange={[2, 'days']} />
// default is [1, 'month']

@t-lock t-lock mentioned this pull request Apr 4, 2023
@t-lock
Copy link
Contributor Author

t-lock commented Apr 10, 2023

Hello @antony, curious is Beyonk still maintaining this repository? If so, I could help out with a few more PR's to address existing issues. Let me know!

@antony
Copy link
Member

antony commented Apr 10, 2023 via email

@t-lock
Copy link
Contributor Author

t-lock commented Apr 10, 2023

Awesome, glad to hear it. From my searching this looks like one of the best datepickers out there right now for Svelte. As far as contributing, this PR is a start!

@antony
Copy link
Member

antony commented Apr 10, 2023

Looks great. Thank you for this. I'll review and merge later today!

Copy link
Member

@antony antony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just switching to meet our linting rules

src/components/DatePicker.svelte Outdated Show resolved Hide resolved
@antony antony merged commit 528e5f0 into beyonk-group:master Apr 11, 2023
@antony
Copy link
Member

antony commented Apr 13, 2023

This is merged now, but docs fail, and I'm not sure why. I notice they are still on snowpack, so we probably should move this lib to SvelteKit. I won't have time immediately, but will get to it ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants