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

Issue with min/maxdate with calendar #8126

Closed
h11a opened this issue Sep 9, 2019 · 2 comments
Closed

Issue with min/maxdate with calendar #8126

h11a opened this issue Sep 9, 2019 · 2 comments

Comments

@h11a
Copy link

h11a commented Sep 9, 2019

Hi,
I am using the calendar and setting both a min/max date like so.

this.calendarConfig.minDate = new Date(1567695600)
this.calendarConfig.maxDate = new Date(1568012400);
  <p-calendar
      dateFormat="dd/mm/yy"
      [(ngModel)]="calendarConfig.selectedDate"
      [minDate]="calendarConfig.minDate"
      [maxDate]="calendarConfig.maxDate"
      (onSelect)="loadCalendarDate()"
      showTime="true"
      [stepMinute]="0"
      [stepHour]="1"
      hourFormat="24"></p-calendar>

This works however I am able to go past the min/max date with the time picker.

Steps:

  1. Go to the min date on the calendar
  2. Keep incrementing the time by 1 hour
  3. you will hit midnight which is before the min date and the time buttons completely lock up.

This can also be done on the max date except you decrement the hour untill you hit 23:00 (which is greater than the maxDate)

I am using version 8.0.3.

Is there a solution to this or is it a bug.

@manjunathmofs
Copy link

Is any fixes done for this issue.

Steps:

when I select max date and do time selection i am facing time restriction to do increment and decrements in selecting hour. I have attached stack-blitz for the issue produced.

https://stackblitz.com/edit/angular-primeng-calendar-spaces-date-format-bv5tj5

@cagataycivici
Copy link
Member

#7381

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants