Skip to content

[pickers][TimePicker] Add views for millisecond editing #5542

Open
@joey-kwl

Description

@joey-kwl

Current behavior 😯

I can't type/edit the millisecond part
image

<TimePicker
	label="End"
	ampm={false}
	disableOpenPicker={true}
	value={endTime}
	inputFormat="HH:mm:ss.SSS"
	onChange={e => {
		console.log(e?.getMilliseconds())
	}}
	renderInput={(params) => <TextField {...params} />}

/>

Expected behavior 🤔

The milliseconds part should change and I should receive the milliseconds inside the onChange function

Steps to reproduce 🕹

Demo: https://codesandbox.io/s/secondstimepicker-demo-mui-x-forked-7in5bw?file=/demo.tsx

Context 🔦

I want a timepicker where you can set/get the milliseconds

Your environment 🌎

System:
    OS: Windows 10 10.0.19043
    CPU: (12) x64 AMD Ryzen 5 2600 Six-Core Processor
    Memory: 5.97 GB / 15.93 GB
  Binaries:
    Node: 16.13.1 - D:\nodejs\node.EXE
    Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 8.12.1 - D:\nodejs\npm.CMD
  Managers:
    Maven: 3.6.3 - D:\apache-maven\bin\mvn.CMD
    pip3: 21.3.1 - D:\Python\Python38\Scripts\pip3.EXE
  Utilities:
    Git: 2.21.0. - /mingw64/bin/git
  Virtualization:
    Docker: 20.10.14 - C:\Program Files\Docker\Docker\resources\bin\docker.EXE
  IDEs:
    VSCode: 1.69.1 - D:\Microsoft VS Code\bin\code.CMD
  Languages:
    Bash: 4.4.23 - D:\Git\usr\bin\bash.EXE
    Go: 1.17 - D:\Go\bin\go.EXE
    Java: 11.0.13 - /c/Program Files/Java/jdk-11.0.13/bin/javac
    Perl: 5.26.2 - D:\Git\usr\bin\perl.EXE
    PHP: 7.4.30 - C:\tools\php74\php.EXE
    Python: 3.8.6 - /d/Python/Python38/python
    Ruby: 2.4.2 - D:\Ruby24-x64\bin\ruby.EXE
  Browsers:
    Chrome: 103.0.5060.114

Order ID 💳 (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: TimePickerThe React component.component: pickersThis is the name of the generic UI component, not the React module!new featureNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions