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: onModelChange not called with keepInvalid=true if user enters a well-formatted date but outside allowed range #13132

Closed
Siggen opened this issue Jun 2, 2023 · 0 comments · Fixed by #13133
Labels
LTS-PORTABLE Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@Siggen
Copy link
Contributor

Siggen commented Jun 2, 2023

Describe the bug

Validators are not fired with keepInvalid=true when user enters a well-formatted date that falls outside its validity range.

        <p-calendar
            formControlName="dueDate"
            [minDate]="today"
            [keepInvalid]="true"
        ></p-calendar>

Today is 02/06/2023 , if user enters "01/01/202" (with keyboard) validators are fired and error is shown
image

but if user enters "01/01/2023" validors are not fired (and no error is shown)
image

I'll submit a PR shortly to fix the probleme.

Environment

Linux Ubuntu 22.04.2 LTS
Firefox 113.0.2 (64-bit)

Reproducer

No response

Angular version

15.2.0

PrimeNG version

15.4.1

Build / Runtime

TypeScript

Language

TypeScript

Node version (for AoT issues node --version)

v16.20.0

Browser(s)

Firefox 113.0.2 (64-bit)

Steps to reproduce the behavior

  1. Copy "01/01/2022" in clipboard
  2. Focus on calendar
  3. Paste "01/01/2022"
  4. Blur

=> no validator fired

Expected behavior

Expecting validators to be fired.

@Siggen Siggen 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 2, 2023
@mertsincan mertsincan added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Aug 26, 2023
@mertsincan mertsincan added this to the 16.2.1 milestone Aug 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTS-PORTABLE Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
3 participants