primefaces / primeng

The Most Complete Angular UI Component Library
https://primeng.org
Other
10.29k stars 4.56k forks source link

Component: Calendar - Update type for minDate and maxDate #15038

Closed avytak closed 1 month ago

avytak commented 6 months ago

Describe the bug

image According to the documentation, the default value for the minDate and maxDate is Null However, the setters for them accept only the Date format. Is it possible to update the setters to accept Nullable? I have a situation when in some cases I don't need to have the minDate in my calendar. A possible workaround is to use unknown

<p-calendar                     
dataType="string"
[minDate]="minDate"
[showIcon]="true"></p-calendar>

this.minDate= null as unknown as Date

,

Environment

Windows 10

Reproducer

No response

Angular version

16.2.8

PrimeNG version

16.5.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.19.1

Browser(s)

Chrome

Steps to reproduce the behavior

No response

Expected behavior

I will be able just to assign null to the variable, without using unknown.

dobanisola-scottlogic commented 5 months ago

This issue can be closed as it has been fixed in this here.

ThoSap commented 5 months ago

No @dobanisola-scottlogic it was fixed here: https://github.com/primefaces/primeng/pull/14754 See discussion https://github.com/orgs/primefaces/discussions/1136

@cetincakiroglu this issue can be closed.

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale. If this issue is still affecting you with the latest version, please leave any comment, and we will keep it open. We are sorry that we have not been able to prioritize it yet. If you have any new additional information, please include it with your comment!

github-actions[bot] commented 1 month ago

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you for your understanding!