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

Add calendarProps prop #400

Open
1 task done
wojtekmaj opened this issue Dec 13, 2021 · 1 comment
Open
1 task done

Add calendarProps prop #400

wojtekmaj opened this issue Dec 13, 2021 · 1 comment
Labels
enhancement New feature or request fresh

Comments

@wojtekmaj
Copy link
Owner

Before you start - checklist

  • I have checked if this feature request is not already reported

Description

Currently, calendar consumes all props with a few exceptions:

const {
calendarClassName,
className: datePickerClassName, // Unused, here to exclude it from calendarProps
onChange,
value,
...calendarProps
} = this.props;

This limits the possibilities of how React-Date-Picker and React-Calendar could be customized. #399 would be an example.

Proposed solution

Allow even more powerful customizations by adding calendarProps object which, you've guessed it, would contain all props that shall be passed to React-Calendar.

Alternatives

No response

Additional information

No response

@wojtekmaj wojtekmaj added the enhancement New feature or request label Dec 13, 2021
@chriscarrillo
Copy link

@wojtekmaj Thank you for this. I believe this would be a great feature to add!

I have set a minDate and maxDate with a default value of undefined but when I open the calendar, today's date shows by default. I would like the minDate to be the default date that shows when the calendar opens. If a minDate is set, I propose the calendar shows that date as the default date instead of today's date.

Nevertheless, if the default date behavior stays the same, since react-calendar has a prop for defaultActiveStartDate, would this change allow me to set the default date that is shown when the calendar is opened?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fresh
Projects
None yet
Development

No branches or pull requests

2 participants