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: Range selection mode should use start date as default date when end date isn't set #15818

Closed
Xylios13 opened this issue Jun 11, 2024 · 0 comments · Fixed by #15820 · 4 remaining pull requests
Closed

Calendar: Range selection mode should use start date as default date when end date isn't set #15818

Xylios13 opened this issue Jun 11, 2024 · 0 comments · Fixed by #15820 · 4 remaining pull requests
Labels
LTS-FIXED-15.4.21 LTS-FIXED-16.9.11 LTS-PORTABLE Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@Xylios13
Copy link

Xylios13 commented Jun 11, 2024

Describe the bug

The PR #13953 introduced a bug to the calendar in range selection mode.

Environment

Chrome 125
Windows 10

Reproducer

https://stackblitz.com/edit/github-naqavf-2gkfmj?file=src%2Fapp%2Fapp.component.html

Angular version

17.3.4

PrimeNG version

17.18.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.19.0

Browser(s)

Chrome 125

Steps to reproduce the behavior

  1. Create a calendar that has selection mode range
  2. Open the calendar
  3. Select one date that is a couple of months before today (e.g., April 1st
    2024
  4. Close the calendar by clicking outside the calendar popup
  5. Open the calendar
  6. The calendar is opened on the current month rather than the month of the
    start date.

Expected behavior

The calendar should should focus on the following dates by priority:

  1. End date when it has one
  2. Start date when it has one
  3. Default date when provided
  4. Use 'now' as fallback
@Xylios13 Xylios13 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 11, 2024
Xylios13 pushed a commit to Xylios13/primeng that referenced this issue Jun 11, 2024
Xylios13 pushed a commit to Xylios13/primeng that referenced this issue Jun 11, 2024
cetincakiroglu added a commit that referenced this issue Jun 13, 2024
Fixed #15818 - Fix calendar range selection shown date
@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working LTS-PORTABLE 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 13, 2024
@cetincakiroglu cetincakiroglu added this to the 17.18.1 milestone Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment