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

Only use day, month, year provided by datepicker #11773

Merged
merged 2 commits into from
May 17, 2017

Conversation

Bargs
Copy link
Contributor

@Bargs Bargs commented May 12, 2017

Fixes #5370

The datepicker directive uses native Javascript Dates, ignoring moment's default timezone. This causes the datepicker and the text input above it to get out of sync if the user changed the dateFormat:tz config in advanced settings. The text input will show the date in the user selected timezone, the datepicker will show the date in the local browser timezone. Since we really just want a day, month, year from the datepicker instead of a moment in time, we grab those individual values from the native date.

@lukasolson lukasolson self-assigned this May 15, 2017
Copy link
Member

@lukasolson lukasolson left a comment

Choose a reason for hiding this comment

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

Behavior and code change LGTM, but can you add a corresponding test for it?

@Bargs
Copy link
Contributor Author

Bargs commented May 15, 2017

@lukasolson test added

Copy link
Member

@lukasolson lukasolson left a comment

Choose a reason for hiding this comment

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

LGTM

@Bargs Bargs merged commit 39eb457 into elastic:master May 17, 2017
Bargs added a commit to Bargs/kibana that referenced this pull request May 17, 2017
* Only use day, month, year provided by datepicker instead of moment in time
Bargs added a commit to Bargs/kibana that referenced this pull request May 17, 2017
* Only use day, month, year provided by datepicker instead of moment in time
Bargs added a commit that referenced this pull request May 18, 2017
* Only use day, month, year provided by datepicker instead of moment in time
Bargs added a commit that referenced this pull request May 18, 2017
* Only use day, month, year provided by datepicker instead of moment in time
snide pushed a commit to snide/kibana that referenced this pull request May 30, 2017
* Only use day, month, year provided by datepicker instead of moment in time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants