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

feat(datetime): configurable timezone for display #19519

Merged

Conversation

daem0ndev
Copy link
Contributor

@daem0ndev daem0ndev commented Oct 1, 2019

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Build (npm run build) was run locally and any changes were pushed
  • Lint (npm run lint) has passed locally and any fixes were made for failures

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Currently there is no way to override the behavior of the ion-datetime converting values to the users local timezone.

Issue Number: #19401

What is the new behavior?

  • Provide ability to specify the timezone for display on ion-datetime using the new displayTimezone property

Does this introduce a breaking change?

  • Yes
  • No

Other information

@ionitron-bot ionitron-bot bot added package: angular @ionic/angular package package: core @ionic/core package labels Oct 1, 2019
Copy link
Member

@liamdebeasi liamdebeasi left a comment

Choose a reason for hiding this comment

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

Not sure if this is a bug related to your changes, but the "Display UTC 00:00 in UTC (display-timezone = 'utc')" picker doesn't seem to be showing 2020 as a year.

image

core/src/components/datetime/datetime.tsx Show resolved Hide resolved
core/src/components/datetime/test/basic/index.html Outdated Show resolved Hide resolved
core/src/components/datetime/test/basic/index.html Outdated Show resolved Hide resolved
core/src/components/datetime/datetime.tsx Outdated Show resolved Hide resolved
core/src/components/datetime/datetime.tsx Outdated Show resolved Hide resolved
@daem0ndev
Copy link
Contributor Author

Not sure if this is a bug related to your changes, but the "Display UTC 00:00 in UTC (display-timezone = 'utc')" picker doesn't seem to be showing 2020 as a year.

image

I dont think its related because the picker above which does not use the displayTimezone does not show the 2020 either

@daem0ndev daem0ndev force-pushed the feat-datetime-display-timezone branch from 1a0a44b to c22a9b5 Compare October 7, 2019 17:41
@daem0ndev
Copy link
Contributor Author

Made the changes :) thanks!

Copy link
Member

@liamdebeasi liamdebeasi left a comment

Choose a reason for hiding this comment

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

Looking great! Found a few small things I was hoping we could address.

core/src/components/datetime/datetime-util.ts Show resolved Hide resolved
core/src/components/datetime/datetime-util.ts Show resolved Hide resolved
core/src/components/datetime/datetime-util.ts Outdated Show resolved Hide resolved
core/src/components/datetime/datetime.tsx Outdated Show resolved Hide resolved
core/src/components/datetime/datetime-util.ts Outdated Show resolved Hide resolved
Copy link
Member

@liamdebeasi liamdebeasi left a comment

Choose a reason for hiding this comment

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

Great job! Just need to fix the failing build, and we can merge this in.

@daem0ndev daem0ndev force-pushed the feat-datetime-display-timezone branch from fb4421c to 62400c4 Compare January 9, 2020 19:45
@daem0ndev daem0ndev force-pushed the feat-datetime-display-timezone branch from 62400c4 to cfe569f Compare January 9, 2020 20:05
@liamdebeasi liamdebeasi merged commit 7b032c5 into ionic-team:master Jan 9, 2020
@liamdebeasi
Copy link
Member

Merged. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: angular @ionic/angular package package: core @ionic/core package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants