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

Ignored Seconds-Change #206

Closed
EaseRider opened this issue Feb 2, 2018 · 2 comments
Closed

Ignored Seconds-Change #206

EaseRider opened this issue Feb 2, 2018 · 2 comments

Comments

@EaseRider
Copy link

Hello again, thank you for this project.

Environment

Tech Version
material-ui-pickers any (beta-14 currently)

Steps to reproduce

  1. DateTimePicker or TimePicker
  2. format='DD.MM.YYYY HH:mm:ss' or 'HH:mm:ss'
  3. Only change Seconds with keyboard
  4. open Picker

Expected behavior

Changing the Seconds should also fire the event, with the new time; maybe parsed by the format.

Actual behavior

Chaning the seconds does not fire the event. So the old value is taken when opening the picker.

Live example

https://codesandbox.io/s/7m97n5wm2j

@dmtrKovalenko
Copy link
Member

Fixed in rc-1

@EaseRider
Copy link
Author

EaseRider commented Mar 26, 2018

@dmtrKovalenko
Doesn't seem to be solved to me.
the error may lie on line 199 in DateTextField.jsx
if (!error && utils.format(newValue, 'LLLL') !== utils.format(oldValue, 'LLLL')) {
Where LLLL formats the date into 'Monday, March 26, 2018 9:31 AM' where the seconds (and millis) are missing.
Something like: 'YYYY-MM-DDTHH:mm:ss.SSSZ' would be the most accurate. But I don't think that the Z would be needed to compare the timezones of the input.

https://codesandbox.io/s/pjzk802vym

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants