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: inputClassName doesn't work #6397

Closed
nivivive opened this issue Apr 16, 2024 · 0 comments · Fixed by #6398, leoo1992/GeradorQRCode#23 or leoo1992/GeradorQRCode#27
Closed

Calendar: inputClassName doesn't work #6397

nivivive opened this issue Apr 16, 2024 · 0 comments · Fixed by #6398, leoo1992/GeradorQRCode#23 or leoo1992/GeradorQRCode#27
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@nivivive
Copy link
Contributor

Describe the bug

inputClassName on Calendar doesn't seem to add classes. Use the demo at https://primereact.org/calendar/ theming, change:

<Calendar value={date} onChange={(e) => setDate(e.value)} inputClassName="asdfasdf"/>

class is not added

Bug seems to have been introduced in 10.6.3 in this PR.

Previously the line used to say:

className={props.inputClassName}

And now it says:

className={(props.inputClassName, cx('input', { context }))}

which only outputs:
'p-inputtext p-component'

It should say:

className=classNames(props.inputClassName, cx("input", { context }))

which would output the expected result:
'asdfasdf p-inputtext p-component'

Reproducer

No response

PrimeReact version

10.6.3

React version

18.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

  1. Use the demo at https://primereact.org/calendar/ theming, change:

<Calendar value={date} onChange={(e) => setDate(e.value)} inputClassName="asdfasdf"/>

  1. Calendar's input has a computed className of 'p-inputtext p-component'

Expected behavior

Calendar's input should have a computed className of 'asdfasdf p-inputtext p-component'

@nivivive nivivive added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Apr 16, 2024
@gucal gucal self-assigned this Apr 16, 2024
@gucal gucal 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 Apr 16, 2024
@gucal gucal removed their assignment Apr 16, 2024
gucal added a commit that referenced this issue Apr 16, 2024
Fix #6397: Calendar inputClassName missing
@gucal gucal added this to the 10.6.4 milestone Apr 16, 2024
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
2 participants