Skip to content

Custom date format is changing date swapping day and month #7345

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

Open
1 task done
ritxi opened this issue May 21, 2025 · 3 comments · May be fixed by #7359
Open
1 task done

Custom date format is changing date swapping day and month #7345

ritxi opened this issue May 21, 2025 · 3 comments · May be fixed by #7359

Comments

@ritxi
Copy link

ritxi commented May 21, 2025

Description

Using DateInput and DateRange with the dateFormatOverride prop to customize format I see date is changed. When selecting 12th May 2025 it then changes it to 5th December 2025.

I expect the date not to be changed.

Reproduction

https://stackblitz.com/edit/parsium-carbon-starter-xe8krcwx?file=src%2FApp.tsx

Steps to reproduce

No response

JIRA ticket numbers (Sage only)

No response

Suggested solution

No response

Carbon version

153.0.0

React version

v17

Design tokens version

No response

Relevant browsers

Chrome

Relevant OSs

MacOS

Additional context

No response

Confidentiality

  • I confirm there is no confidential or commercially sensitive information included.
@ritxi ritxi added Bug triage Triage Required labels May 21, 2025
@roekeloosren
Copy link

If we can please get this fix asap. We have this component in production currently and we need to use for the launch of Sage Payroll Advanced for our BCEA project. Please let us know what the ETA will be.

@Parsium Parsium added On Backlog and removed triage Triage Required labels Jun 2, 2025
@Parsium
Copy link
Contributor

Parsium commented Jun 2, 2025

FE-7268

@Parsium
Copy link
Contributor

Parsium commented Jun 2, 2025

Hi @roekeloosren 👋🏼 We are currently working on a fix for this, so we'll aim to have this released as soon as possible. Please feel to externally contact our team lead @nicktitchmarsh and they should be able to provide a better ETA estimate for you.

nuria1110 added a commit that referenced this issue Jun 2, 2025
…rmatted value

When overridding the default date format, the format was not always respected and would switch to
the default in some cases where the day and month were flipped.

fix #7345
nuria1110 added a commit that referenced this issue Jun 5, 2025
…rmatted value

When overridding the default date format, the format was not always respected and would switch to
the default in some cases where the day and month were flipped.

fix #7345
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants