Skip to content

Datepicker not rendering nexticon and previousicon if custom templates are used #17771

Open
@andrebernardini

Description

@andrebernardini

Describe the bug

If custom templates are used in the datepicker for previousicon and nexticon, the buttons are rendered without any content.

Pull Request Link

No response

Reason for not contributing a PR

  • Lack of time
  • Unsure how to implement the fix/feature
  • Difficulty understanding the codebase
  • Other

Other Reason

No response

Reproducer

https://stackblitz.com/edit/fjruux2y?file=src%2Fapp%2Fdatepicker-basic-demo.html

Environment

N/A (stackblitz provided)

Angular version

19.1.6

PrimeNG version

v19

Node version

No response

Browser(s)

No response

Steps to reproduce the behavior

With the provided Stackblitz example:

  1. Visit the URL and wait until everything is compiled and started
  2. Open the datepicker
  3. Inspect the state of the previousbutton (the one to navigate to the previous month).

Previousbutton uses a custom template for its icon while the nextbutton does not (if you use a custom template for nexticon, the same problem will appear there).

Image

Expected behavior

Custom template should be rendered inside the button

Metadata

Metadata

Labels

Type: BugIssue contains a bug related to a specific component. Something about the component is not working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions