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

fix(datetimepicker): invalid value passed to formatTime [MA-2131] #1881

Merged
merged 17 commits into from
Dec 6, 2023

Conversation

mihai-peteu
Copy link
Contributor

@mihai-peteu mihai-peteu commented Nov 29, 2023

Summary

https://konghq.atlassian.net/browse/MA-2131

Error was occurring whenever the consuming app was passing in an invalid time range such as

{
  start: null,
  end: null
}

This was not an issue for relative time frames, only the custom calendar range. We now default that time range's start and end values to today's date, and we avoid passing a null value to formatDisplayDate(), which calls date-fns-tz's formatTime function under the hood

Changes, hiding whitespace (easier to review):

https://github.com/Kong/kongponents/pull/1881/files?w=1

Sandbox preview:

https://deploy-preview-1881--kongponents.netlify.app/components/datetime-picker.html

PR Checklist

  • Conventional Commits all commits follow the conventional commit standards outlined in the main README.
  • Tests coverage: test coverage was added for new features and bug fixes
  • Docs: includes a technically accurate README

@mihai-peteu mihai-peteu changed the base branch from main to alpha November 29, 2023 22:28
Copy link

netlify bot commented Nov 29, 2023

Deploy Preview for kongponents ready!

Name Link
🔨 Latest commit 0331dc7
🔍 Latest deploy log https://app.netlify.com/sites/kongponents/deploys/6570d4e7a1b2c200086770f2
😎 Deploy Preview https://deploy-preview-1881--kongponents.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Nov 29, 2023

Deploy Preview for kongponents-sandbox ready!

Name Link
🔨 Latest commit 0331dc7
🔍 Latest deploy log https://app.netlify.com/sites/kongponents-sandbox/deploys/6570d4e73ce1b5000724fcb1
😎 Deploy Preview https://deploy-preview-1881--kongponents-sandbox.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mihai-peteu mihai-peteu force-pushed the fix/ma-2131-invalid-value-formatTime branch from 94d4d88 to 108e04a Compare November 30, 2023 21:24
filipgutica
filipgutica previously approved these changes Dec 4, 2023
filipgutica
filipgutica previously approved these changes Dec 5, 2023
docs/guide/migrating-to-version-9.md Outdated Show resolved Hide resolved
docs/guide/migrating-to-version-9.md Outdated Show resolved Hide resolved
src/components/KDateTimePicker/KDateTimePicker.vue Outdated Show resolved Hide resolved
src/components/KDateTimePicker/KDateTimePicker.vue Outdated Show resolved Hide resolved
src/types/date-time-picker.ts Outdated Show resolved Hide resolved
src/types/date-time-picker.ts Outdated Show resolved Hide resolved
@mihai-peteu
Copy link
Contributor Author

@adamdehaven cleaned up the markdown file, no more mention of minuteIncrement

@mihai-peteu mihai-peteu enabled auto-merge (squash) December 6, 2023 20:22
Copy link
Member

@adamdehaven adamdehaven left a comment

Choose a reason for hiding this comment

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

✅ based on Analytic team's review

@mihai-peteu mihai-peteu merged commit 6dde6a5 into alpha Dec 6, 2023
9 checks passed
@mihai-peteu mihai-peteu deleted the fix/ma-2131-invalid-value-formatTime branch December 6, 2023 20:27
kongponents-bot pushed a commit that referenced this pull request Dec 6, 2023
# [9.0.0-alpha.70](v9.0.0-alpha.69...v9.0.0-alpha.70) (2023-12-06)

### Bug Fixes

* **datetimepicker:** invalid value passed to formatTime [MA-2131] ([#1881](#1881)) ([6dde6a5](6dde6a5))
@kongponents-bot
Copy link
Collaborator

🎉 This PR is included in version 9.0.0-alpha.70 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

6 participants