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

[docs] Fix DatePicker of 'Customization' section #1904

Merged
merged 2 commits into from
Jun 22, 2020

Conversation

bertrandp
Copy link
Contributor

Environment

Tech Version
@material-ui/pickers v4.0.0-alpha.8

Description

The DatePicker of 'Customization' section is broken.
https://next.material-ui-pickers.dev/demo/datepicker#customization

@vercel
Copy link

vercel bot commented Jun 17, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/mui-org/material-ui-pickers/agt3i6azj
✅ Preview: https://material-ui-pickers-git-fork-bertrandp-patch-1.mui-org.vercel.app

@cypress
Copy link

cypress bot commented Jun 17, 2020



Test summary

78 0 1 0


Run details

Project material-ui-pickers
Status Passed
Commit 34bbf99
Started Jun 19, 2020 2:01 PM
Ended Jun 19, 2020 2:04 PM
Duration 03:05 💡
OS Linux Debian - 10.0
Browser Chrome 80

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

Comment on lines 36 to 38
const renderWeekPickerDay = (date, selectedDates, DayComponentProps) => {
let dateClone = makeJSDateObject(date);
let selectedDateClone = makeJSDateObject(selectedDate);
let selectedDateClone = makeJSDateObject(selectedDates[0]);
Copy link
Member

Choose a reason for hiding this comment

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

🤦‍♂️ it is fail

You are right, we changed calendar selected days to be an array when implementing date range picker. Here will be enough to only rename argument (because we have selected date available as state variable)

But this makes me think that we don't need this argument at all

@oliviertassinari
Copy link
Member

oliviertassinari commented Jun 19, 2020

Interesting. @dmtrKovalenko What do you think of updating the current eslint configuration to match the one from the main repository? If we lint docs/pages/demo/datepicker/CustomDay.example.jsx with the eslint config of the main repo, we get this error:

Capture d’écran 2020-06-19 à 20 52 38

Arguably, it could help avoid cases like this one :)

@dmtrKovalenko dmtrKovalenko merged commit 21ef115 into mui:next Jun 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants