-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Labels
Status: Needs Reproducer
Issue needs a runnable reproducer
Comments
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
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
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
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() : ""}
)}
/>
The text was updated successfully, but these errors were encountered: