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

# CX-17328 - fix(release): update event flow for date picker #1861

Merged
merged 4 commits into from
Jan 17, 2025

Conversation

cormacmchale1
Copy link
Contributor

Events need to propogate to the UI impl on blank values for dates. So that the UI can respond appropriately.

Description

The if statement would ignore blank values, and the method flow would propogate the previous value, which is then ignored by DateTimePicker.ts in it's updated flow.

Related Issue

Motivation and Context

Makes sure any UI that implements this can respond if required to a blank value entering the input field for the date picker.

How Has This Been Tested?

Manually(Sandbox) and in tests.

Screenshots:

Before (If applicable):

After:

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Events need to propogate to the UI impl on blank values for dates.
NotNestor
NotNestor previously approved these changes Jan 16, 2025
@cormacmchale1 cormacmchale1 changed the title # CX-17328 - fix(release): update event floe for date picker # CX-17328 - fix(release): update event flow for date picker Jan 16, 2025
Events need to propogate to the UI impl on blank values for dates.
if (this.value && changedProperties.has("value")) {
this.parseValueForVisuals(this.value);
if (changedProperties.has("value")) {
if (this.value) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Again here. To tell the UI about the blank value we need to not bail out here

}
else
{
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is worth talking about. This will send a datetime back as
Screenshot 2025-01-16 at 11 36 21

Which is correct but worth flagging

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Needs to be done in this manner as typescript won't allow the use of this.value without the check.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The formatting on the code is updated since this commit

Events need to propogate to the UI impl on blank values for dates.
@NotNestor NotNestor merged commit 359e0e7 into momentum-design:main Jan 17, 2025
8 of 9 checks passed
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.

2 participants