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

Calendar: Console warning using ParseDateTime #3777

Closed
melloware opened this issue Dec 12, 2022 · 0 comments · Fixed by #3778
Closed

Calendar: Console warning using ParseDateTime #3777

melloware opened this issue Dec 12, 2022 · 0 comments · Fixed by #3778
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@melloware
Copy link
Member

Describe the bug

<Calendar
          id="basic"
          value={date1}
          onChange={(e) => setDate1(e.value)}
          parseDateTime={(text) => {
            return new Date(text);
          }}
        />

Generates Console Warning: chunk-WMIXMSGG.js?v=05aba1d3:519 Warning: React does not recognize the parseDateTime prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase parsedatetime instead. If you accidentally passed it from a parent component, remove it from the DOM element."

Reproducer

https://stackblitz.com/edit/vitejs-vite-ibhemr?file=package.json,src%2FApp.tsx

PrimeReact version

8.7.3

React version

17.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

ALL

Steps to reproduce the behavior

See reproducer

Expected behavior

No Console Warning

@melloware melloware added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 12, 2022
@melloware melloware self-assigned this Dec 12, 2022
melloware added a commit to melloware/primereact that referenced this issue Dec 12, 2022
@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Dec 12, 2022
@melloware melloware added this to the 8.7.4 milestone Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant