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

Table filter: templating filter as Calendar with selectionMode range throws error #15576

Closed
dterol opened this issue May 15, 2024 · 1 comment · Fixed by #15600 · 4 remaining pull requests
Closed

Table filter: templating filter as Calendar with selectionMode range throws error #15576

dterol opened this issue May 15, 2024 · 1 comment · Fixed by #15600 · 4 remaining pull requests
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@dterol
Copy link

dterol commented May 15, 2024

Describe the bug

Templating filter as Calendar with selectionMode range throws error when increment/decrement time.

Here an example:

<p-columnFilter
field="timestamp"
type="date"
display="menu"
[showMatchModes]="false"
[showOperator]="false"
[showAddButton]="false"
[showClearButton]="false"
>

<p-calendar
inputId="timestampRange"
[ngModel]="value"
[readonlyInput]="true"
[showTime]="true"
[showIcon]="true"
hourFormat="24"
selectionMode="range"
[showSeconds]="true"
dateFormat="yy-mm-dd"
[required]="true"
>

Here the error from console:

main.44d5f1af5cc45044.js:1 TypeError: n.toDateString is not a function
at t.toggleAMPMIfNotMinDate (main.44d5f1af5cc45044.js:1:647613)
at t.incrementHour (main.44d5f1af5cc45044.js:1:647394)
at t.repeat (main.44d5f1af5cc45044.js:1:648205)
at t.onTimePickerElementMouseDown (main.44d5f1af5cc45044.js:1:647783)
at main.44d5f1af5cc45044.js:1:614252
at yT (main.44d5f1af5cc45044.js:1:105707)
at r (main.44d5f1af5cc45044.js:1:105880)
at HTMLButtonElement. (main.44d5f1af5cc45044.js:1:177001)
at l.invokeTask (polyfills.a85ee331dfc35634.js:1:19273)
at Object.onInvokeTask (main.44d5f1af5cc45044.js:1:92137)

Environment

N/A

Reproducer

No response

Angular version

17.3.7

PrimeNG version

17.16.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.10.0

Browser(s)

All

Steps to reproduce the behavior

  1. Template filter as calendar with selection mode range and show time.
  2. Increment or decrement time.

Expected behavior

No error expected.

@dterol dterol added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label May 15, 2024
@mehmetcetin01140 mehmetcetin01140 self-assigned this May 17, 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 May 17, 2024
@mehmetcetin01140 mehmetcetin01140 added this to the 17.17.1 milestone May 17, 2024
mehmetcetin01140 added a commit that referenced this issue May 17, 2024
@cetincakiroglu cetincakiroglu modified the milestones: 17.18.0, 18.Future May 30, 2024
@mahmoudmohsendev
Copy link

Please any updates on this issue ??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment