Skip to content

[bug] Format date values with expected format #61

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

Merged
merged 2 commits into from
Feb 26, 2023

Conversation

AnalogMemory
Copy link
Contributor

@AnalogMemory AnalogMemory commented Feb 3, 2023

Description

Date values are displayed in ISO 8601 format YYYY-MM-DD but value returned can be formatted differently for single digit days or months.

For example, if you have a date field with a value of 2023-01-09, the value returned will be 2023-1-9.

Because whole numbers are passed into arguments of the function clickDay and then concatenated into a string, the leading zeros are dropped.

This PR adds passes the final values into the dayjs formatter to ensure that the date is formatted correctly.

Fixes #25

Date values are expected to be in ISO 8601 format (YYYY-MM-DD) but value returned can be off on single digit days and months
Copy link
Contributor

@devinmatte devinmatte left a comment

Choose a reason for hiding this comment

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

This fixes the problem I was facing in #25

@AnalogMemory AnalogMemory mentioned this pull request Feb 26, 2023
@onesine
Copy link
Owner

onesine commented Feb 26, 2023

Hi @AnalogMemory 👋

Thanks for this PR and sorry for the delay. I wasn't available lately so I didn't have time to properly follow the progress of the package. I find the problem this package solves weird too. I have never encountered it before. I will see your PR.

PR will always be welcome. Again, thanks for the PR.

Copy link
Owner

@onesine onesine left a comment

Choose a reason for hiding this comment

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

You are right, @AnalogMemory. I just noticed the same problem and your PR solves it. But we didn't have this problem before. That's probably why it looked strange to the contributors. Maybe it seems like there are regressions due to contributions. I will approve your PR while we find the cause of this problem.

@onesine onesine merged commit f7c0b62 into onesine:master Feb 26, 2023
@AnalogMemory AnalogMemory deleted the fix/format-returned-value branch February 27, 2023 02:15
@AnalogMemory
Copy link
Contributor Author

Thanks @onesine looking forward to seeing these changes in a new release 😺

@onesine
Copy link
Owner

onesine commented Mar 7, 2023

Sorry for the wait @AnalogMemory, I wanted to add some corrections before publishing a new update. But I will publish it anyway.

@sesolaga
Copy link
Contributor

This bug still persists when using a footer and the "Apply" button.

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.

Format issue
4 participants