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

[pickers] Date time picker upon clicking on field white space cursor focuses on month #10983

Closed
arjaym-dev opened this issue Nov 10, 2023 · 3 comments
Labels
component: pickers This is the name of the generic UI component, not the React module! support: commercial Support request from paid users

Comments

@arjaym-dev
Copy link

arjaym-dev commented Nov 10, 2023

The problem in depth 🔍

Here's the live example of the said odd behavior https://codesandbox.io/s/date-time-picker-behavior-ptxpkp?file=/src/Demo.js

date time picker

Above image show that if i try to click the white space in date time picker the cursor focuses on the month, is there any way to handle it so that if i try to click on the white space the cursor stays on the end of date time text which is the :mm

In the codesandbox i try removing the inputProps but it does not go well as it need due to its ref,

Your environment 🌎

`npx @mui/envinfo`
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Search keywords: date time picker
Order ID: 70493

@arjaym-dev arjaym-dev added status: waiting for maintainer These issues haven't been looked at yet by a maintainer support: commercial Support request from paid users labels Nov 10, 2023
@LukasTy
Copy link
Member

LukasTy commented Nov 10, 2023

Hello, could you confirm why you find this behavior odd?
This is exactly the same behavior as the native date input as seen in this video.

Screen.Recording.2023-11-10.at.09.24.00.mov

With the field components, we are trying to keep their behavior as close to native pickers behavior wise, as possible, while extending their capabilities. 🤔

@LukasTy LukasTy added status: waiting for author Issue with insufficient information component: pickers This is the name of the generic UI component, not the React module! and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Nov 10, 2023
@LukasTy LukasTy changed the title Date time picker upon clicking on field white space cursor focuses on month [pickers] Date time picker upon clicking on field white space cursor focuses on month Nov 10, 2023
@arjaym-dev
Copy link
Author

Ahhh i see, i just thought that mui were using different type of input such as text to handle it. So basically it was using the date input. This helps alot thankss @LukasTy i'll now close this .

@github-actions github-actions bot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for author Issue with insufficient information labels Nov 10, 2023
@LukasTy
Copy link
Member

LukasTy commented Nov 10, 2023

So basically it was using the date input.

Not exactly. We have our own implementation that we call Field and it is by default using a TextField internally.
I just mentioned that we try to mimic the behavior of the native date input where it makes sense. 😉

@LukasTy LukasTy removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pickers This is the name of the generic UI component, not the React module! support: commercial Support request from paid users
Projects
None yet
Development

No branches or pull requests

2 participants