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

SelectionType='single' and DateRange value #241

Open
adam-dicker opened this issue Feb 17, 2021 · 1 comment
Open

SelectionType='single' and DateRange value #241

adam-dicker opened this issue Feb 17, 2021 · 1 comment

Comments

@adam-dicker
Copy link

adam-dicker commented Feb 17, 2021

I am try to render a DateRange using this component in single mode. Click on a single date, and then render the whole week for that day as selected. Is this supported?

Basically it boils down to:

<DateRangePicker
  value={{start: start, end: end}}
  selectionType={'single'}
 />

I am getting the following error:

TypeError: Cannot read property 'year' of undefined
    at isVisible (DateRangePicker.js:434)
    at Object.isStartOrEndVisible (DateRangePicker.js:441)
    at Object.DateRangePicker_componentWillReceiveProps [as componentWillReceiveProps] (DateRangePicker.js:156)
    at callComponentWillReceiveProps (react-dom.development.js:12994)
    at updateClassInstance (react-dom.development.js:13200)
    at updateClassComponent (react-dom.development.js:17131)
    at beginWork (react-dom.development.js:18653)
    at HTMLUnknownElement.callCallback (react-dom.development.js:188)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:237)
    at invokeGuardedCallback (react-dom.development.js:292)
@Valicious
Copy link

The issue still seems to be present. Any indication that this is being looked into?

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

No branches or pull requests

2 participants