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

[joy-ui][docs] Fix the date min & max slot props values on the Input demo #40018

Merged
merged 2 commits into from
Nov 29, 2023

Conversation

avikalpg
Copy link
Contributor

@avikalpg avikalpg commented Nov 27, 2023

Earlier, the values were set as "2018-06-07T00:00", which does not work. Changing these values to the "2018-06-07" format works perfectly.

…put element

Earlier, the values were set as "2018-06-07T00:00", which does not work.
Changing these values to the "2018-06-07" format works perfectly.

Signed-off-by: Avikalp Kumar Gupta <avikalpg@users.noreply.github.com>
@mui-bot
Copy link

mui-bot commented Nov 27, 2023

Netlify deploy preview

https://deploy-preview-40018--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against 4916cbe

@avikalpg avikalpg changed the title [InputSlotProps.tsx] Fix the min & max in slot props for date-type Input Element [joy-ui][docs] InputSlotProps.tsx: Fix the min & max in slot props for date-type Input Element Nov 27, 2023
@danilo-leal danilo-leal added docs Improvements or additions to the documentation package: joy-ui Specific to @mui/joy component: input This is the name of the generic UI component, not the React module! labels Nov 27, 2023
@danilo-leal danilo-leal changed the title [joy-ui][docs] InputSlotProps.tsx: Fix the min & max in slot props for date-type Input Element [joy-ui][docs] Fix the date min & max slot props values on the Input demo Nov 27, 2023
@avikalpg
Copy link
Contributor Author

avikalpg commented Nov 27, 2023

@danilo-leal I see that the argos test is failing because the UI has changed. I can fix it by changing the max value to a different year than the min value.

Shall I do that?

Why has the UI changed?

The min and max values in the example are in the same month of the same year. Hence, the UI now shows them as fixed (instead of mm/dd/yyyy, it shows 06/dd/2018) - which is expected behaviour.

By changing the max value to 2019-06-07, for example, no part of the date string will be fixed anymore. Hence it will show mm/dd/yyyy again.

Is there a potential downside to the fix?

The user will not be able to see both, the min and the max values being enforced in action from a single view of the date-selector modal. They will see the max in action, though, because 2019 is in the past.

@avikalpg
Copy link
Contributor Author

avikalpg commented Nov 29, 2023

@siriwatknp Please let me know if you have any concerns with this pull request or if you'd like me to change anything.

Copy link
Contributor

@zanivan zanivan left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thanks for the submission 🚀

@zanivan zanivan merged commit 5fece8e into mui:master Nov 29, 2023
22 checks passed
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Nov 30, 2023
…demo (mui#40018)

Signed-off-by: Avikalp Kumar Gupta <avikalpg@users.noreply.github.com>
@avikalpg avikalpg deleted the patch-2 branch December 1, 2023 09:30
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Dec 1, 2023
…demo (mui#40018)

Signed-off-by: Avikalp Kumar Gupta <avikalpg@users.noreply.github.com>
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Dec 1, 2023
…demo (mui#40018)

Signed-off-by: Avikalp Kumar Gupta <avikalpg@users.noreply.github.com>
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Dec 6, 2023
…demo (mui#40018)

Signed-off-by: Avikalp Kumar Gupta <avikalpg@users.noreply.github.com>
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Dec 6, 2023
…demo (mui#40018)

Signed-off-by: Avikalp Kumar Gupta <avikalpg@users.noreply.github.com>
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Dec 6, 2023
…demo (mui#40018)

Signed-off-by: Avikalp Kumar Gupta <avikalpg@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: input This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation package: joy-ui Specific to @mui/joy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants