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: onInput and onChange event not triggert after mask is set #6792

Closed
krpdani opened this issue Jun 25, 2024 · 1 comment
Closed

Calendar: onInput and onChange event not triggert after mask is set #6792

krpdani opened this issue Jun 25, 2024 · 1 comment
Labels
Status: Needs Reproducer Issue needs a runnable reproducer

Comments

@krpdani
Copy link

krpdani commented Jun 25, 2024

Describe the bug

I wanted to implement validation, so if the input mask is filled to validate Date with yup, the problem is im getting no informaion from any of events, onChange and onInput are not working if the mask is set <Calendar
onInput={() => console.log("on input")}
mask="99.99.9999"
onChange={() => console.log("on change")}
showIcon
/> component with yup and react-hook-form looks like this ```
<Controller
name="dateFrom"
control={control}
render={({field}) => (


<Calendar
inputId={field.name}
{...field}
dateFormat="dd.mm.yy"
placeholder="von TT.MM.JJJJ"
onChange={(e) => field.onChange(e.value)}
showIcon
/>
<label htmlFor={field.name} className={font-medium ${errors.dateFrom ? "text-red-600" : "text-600"}}>
{errors.dateFrom ? errors.dateFrom.message?.toString() : ""}


)}
/>


### Reproducer

_No response_

### PrimeReact version

"primereact": "^9.2.0",

### React version

17.x

### Language

TypeScript

### Build / Runtime

Create React App (CRA)

### Browser(s)

Chrome

### Steps to reproduce the behavior

_No response_

### Expected behavior

_No response_
@krpdani krpdani added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jun 25, 2024
@melloware melloware added Status: Needs Reproducer Issue needs a runnable reproducer and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jun 25, 2024
Copy link

Please fork the Stackblitz project and create a case demonstrating your bug report. This issue will be closed if no activities in 20 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Reproducer Issue needs a runnable reproducer
Projects
None yet
Development

No branches or pull requests

2 participants