I'm submitting a ...
[X] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35
I found the bug here:
In calendar.ts/onUserInput() there is a call to this.isSelectable(value.getDate(), ...
But in case of selectionMode="range" value is an array -> causes an error when try to call value.getDate().
Plunkr Case (Bug Reports)
https://stackblitz.com/edit/github-fjpcup
Current behavior
not possible to edit a date-range via textfield
Expected behavior
like it was in primeng 6.X
Minimal reproduction of the problem with instructions
try to change the date-range via textfield here:
https://stackblitz.com/edit/github-fjpcup
Angular version: 7.X
PrimeNG version: 7.X
Browser: [all ]
Language: [all]
I'm having the same problem, please fix...
We're having same issue. In docs range calendar has readonly input by default. If it is desired behaviour please secure it somehow because now it is throwing an error when calendar is using time picker additionaly.
This issue happens even in version 6.1.7.
Everythings works fine in version 6.1.4. I haven't tested versions between them.
vendor.js:61083 ERROR TypeError: Cannot read property '1' of null
at Calendar.push../node_modules/primeng/components/calendar/calendar.js.Calendar.validateHour (vendor.js:102157)
at Calendar.push../node_modules/primeng/components/calendar/calendar.js.Calendar.incrementHour (vendor.js:102079)
at Calendar.push../node_modules/primeng/components/calendar/calendar.js.Calendar.repeat (vendor.js:102114)
at Calendar.push../node_modules/primeng/components/calendar/calendar.js.Calendar.onTimePickerElementMouseDown (vendor.js:102094).
Steps to reproduce:
I have the same problem. When typeing a range in a calendar, the whole input gets cleared
Please fix
Thx
The same problem i have
<p-calendar
id="calendar"
selectionMode="range"
showButtonBar="true"
pattern="MM-dd-yyyy"
[readonlyInput]="true"
[numberOfMonths]="3"
[placeholder]="rangeDates"
[(ngModel)]="rangeDates"
(ngModelChange)="calendarDatesChange($event)"
[showIcon]="true"
>
then i try edit manual by keyboard i have null value
I created PR for this bug #7580 :)
Most helpful comment
I created PR for this bug #7580 :)