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

date #172

Merged
merged 7 commits into from
Sep 19, 2021
Merged

date #172

merged 7 commits into from
Sep 19, 2021

Conversation

mbostock
Copy link
Member

@mbostock mbostock commented Sep 17, 2021

Fixes #38.

@mbostock mbostock marked this pull request as ready for review September 18, 2021 23:30
@mbostock mbostock requested a review from Fil September 18, 2021 23:30
@mbostock
Copy link
Member Author

I’ve been doing a lot of time-series analysis and feel this is sorely needed. 😄

Copy link
Collaborator

@Fil Fil left a comment

Choose a reason for hiding this comment

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

I've added some documentation. It misses a screenshot.

The displayed date is always in the browser’s locale. On macos, I can change an application’s locale from the System preferences: I was able to verify that by default 2021-09-19 is displayed as 09/19/2021 in the English locale, and 19/09/2021 in the French locale. There doesn't seem to be a way to control this behavior from the input itself, by passing a locale.

@mbostock
Copy link
Member Author

Thanks for the contributions!

FYI, I’d also like to have an Inputs.datetime (or Inputs.date({type: "datetime-local"})?) in the future. We could also have an Inputs.time, but that wouldn’t be represented as a Date, so that might be better left as Inputs.text({type: "time"}).

@mbostock mbostock merged commit e068507 into main Sep 19, 2021
@mbostock mbostock deleted the mbostock/date branch September 19, 2021 15:01
@mbostock mbostock mentioned this pull request Oct 7, 2021
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

Successfully merging this pull request may close these issues.

Date and Time
2 participants