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

p-calendar in range mode does not allow manually typing single date #14590

Closed
sandrotonon opened this issue Jan 19, 2024 · 1 comment · Fixed by #14781
Closed

p-calendar in range mode does not allow manually typing single date #14590

sandrotonon opened this issue Jan 19, 2024 · 1 comment · Fixed by #14781
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@sandrotonon
Copy link
Contributor

sandrotonon commented Jan 19, 2024

Describe the bug

Using p-calendar in range mode. Need to be able to type in a single date. This can be selected from the UI picker by clicking a date and outside the calendar. However, if a single date is typed in manually then the input is rejected and the calendar reverts to an empty value.
The input is only accepted if a full range is manually typed in.

Also see issue #12286

Environment

OS: macOS Sonoma 14.2.1
Browser: Firefox 121.0.1

Reproducer

https://stackblitz.com/edit/ngnlme

Angular version

17.1.0

PrimeNG version

17.3.2

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.10.0

Browser(s)

No response

Steps to reproduce the behavior

  1. Open demo
  2. Klick Input field
  3. Type one single Date (e.g. 01/01/2022)
  4. Tab outside the field

Expected behavior

When typing in a single Date into a calendar in range-mode, the Datepicker should switch to the typed date (according to the configured locale).

@sandrotonon sandrotonon added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 19, 2024
@mehmetcetin01140 mehmetcetin01140 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 Feb 5, 2024
@eduardheller89
Copy link
Contributor

Any updates to this? I see also another problem in single dates: If date is higher than "maxDate" it stays in the input field. This is not the behaviour I see when I put in both range dates, where its gets deleted automatically.

eduardheller89 pushed a commit to eduardheller89/primeng that referenced this issue Feb 10, 2024
@cetincakiroglu cetincakiroglu added this to the 17.13.0 milestone Mar 22, 2024
cetincakiroglu added a commit that referenced this issue Mar 22, 2024
Fix #14590 and #12286 - Single dates not possible with calendar in range mode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants