Skip to content

Invalid Date format in Hover data when full hour (0 mins) #911

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

Closed
fhurta opened this issue Sep 7, 2016 · 2 comments · Fixed by #1078
Closed

Invalid Date format in Hover data when full hour (0 mins) #911

fhurta opened this issue Sep 7, 2016 · 2 comments · Fixed by #1078
Labels
bug something broken
Milestone

Comments

@fhurta
Copy link
Contributor

fhurta commented Sep 7, 2016

If the time is full hour (0 minutes), e.g. 12:00, the minutes part is stripped from points[index].x in plotly_hover event.

For x value of '2001-06-11 12:00', the points[0].x value is '2001-06-11 12' - the missing minutes part makes it invalid Date when used in new Date(points[0].x).

See this codepen

@etpinard etpinard added the bug something broken label Sep 7, 2016
@etpinard etpinard added this to the Better dates milestone Sep 7, 2016
@etpinard
Copy link
Contributor

pinging @alexcjohnson - who's been working on our date handlers lately.

@alexcjohnson
Copy link
Collaborator

Ah interesting... true, every other truncation of the full date format is common except this one. I'll make sure we keep minutes unless hours are going away too.

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

Successfully merging a pull request may close this issue.

3 participants