We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
2.4.2
DateRangePicker throws an error when I clear any time data. Select any field value and delete numbers to zero.
No response
I guess it must be 0 or an empty field without throwing an error.
My code
type TProps = { selectedDate: RangeValue<DateValue> onDateSelection: (dateRange: RangeValue<DateValue>) => void } function MonthPicker({ selectedDate, onDateSelection }: TProps) { return ( <div className='mb-6 flex justify-between'> <div> <DateRangePicker label='Select a date range' labelPlacement='outside' value={selectedDate} onChange={onDateSelection} /> </div> </div> ) } export default memo(MonthPicker)
Video
On your site also error.
Chrome
The text was updated successfully, but these errors were encountered:
ENG-1090 [BUG] - DateRangePicker throws an error when I clear any time data
Sorry, something went wrong.
When you clear the field the value becomes null. You could make this change const startYear = startDate && format(startDate, "y")
null
const startYear = startDate && format(startDate, "y")
I could reproduce the error in stories and in docs (https://nextui.org/docs/components/date-range-picker#presets).
@wingkwong can i work on this and create a PR?
@ShrinidhiUpadhyaya Assigned. Feel free to ping me if you have any questions.
fix(date-range-picker): error on clear nextui-org#3388
9c1da4c
ShrinidhiUpadhyaya
Successfully merging a pull request may close this issue.
NextUI Version
2.4.2
Describe the bug
DateRangePicker throws an error when I clear any time data. Select any field value and delete numbers to zero.
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
Expected behavior
I guess it must be 0 or an empty field without throwing an error.
Screenshots or Videos
My code
Video
Screen.Recording.2024-07-01.at.23.13.31.mov
On your site also error.
Operating System Version
Browser
Chrome
The text was updated successfully, but these errors were encountered: