-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[pickers] Do not support unparsed date formats anymore #6170
Conversation
These are the results for the performance tests:
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read some files, but it would take an eternity to open each file modification to check if modification are just type renaming or logic modification. Are there some specific lines on which you have a doubt?
@@ -73,7 +73,7 @@ For ease of use, the date picker will automatically change the layout between po | |||
|
|||
## Sub-components | |||
|
|||
Some lower-level sub-components (`CalendarPicker`, `MonthPicker`, and `YearPicker`) are also exported. These are rendered without a wrapper or outer logic (masked input, date values parsing and validation, etc.). | |||
Some lower-level sub-components (`CalendarPicker`, `MonthPicker`, and `YearPicker`) are also exported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the link with this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
date values parsing
There is no parsing any more, that's the part related to this PR
validation
Not related to this PR but this is false, they do have validation
masked input
Indeed, but I don't think it's worth specifying the the MonthPicker
does not have a masked input, it's obvious by looking at the example below
packages/x-date-pickers-pro/src/DateRangePicker/DateRangePickerView.tsx
Outdated
Show resolved
Hide resolved
[...document.querySelectorAll('button.load-diff-button')].forEach(button => button.click()); 🙈 😆 |
packages/x-date-pickers-pro/src/DateRangePicker/DateRangePickerView.tsx
Outdated
Show resolved
Hide resolved
packages/x-date-pickers-pro/src/MultiInputDateRangeField/useMultiInputDateRangeField.ts
Outdated
Show resolved
Hide resolved
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
The internals mostly, the main point of risk for me is in |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
packages/x-date-pickers/src/internals/components/wrappers/WrapperProps.ts
Show resolved
Hide resolved
|
||
newDateRange[index] = newDate; | ||
const currentDateRange = | ||
valueProp ?? firstDefaultValue.current ?? dateRangePickerValueManager.emptyValue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you need to clean this value?
valueProp ?? firstDefaultValue.current ?? dateRangePickerValueManager.emptyValue; | |
dateRangePickerValueManager.cleanValue(valueProp) ?? firstDefaultValue.current ?? dateRangePickerValueManager.emptyValue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the field need to remove the invalid date.
To be honest I think it's not great on the view either but I did not feel confident removing this security.
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Closes #5759