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

calendar component type null issue #2053

Merged
merged 1 commit into from
Jun 6, 2021

Conversation

TrabelsiHoussem
Copy link
Contributor

I m following this demo https://codesandbox.io/s/hejhs?file=/src/demo/CalendarDemo.tsx:2121-2154 which contains some errors in all setDate hooks like this one setDate8(e.value)

here is the error description

CalendarChangeParams.value: Date | Date[] | null | undefined
Argument of type 'Date | Date[] | null | undefined' is not assignable to parameter of type 'SetStateAction<Date | Date[] | undefined>'.
Type 'null' is not assignable to type 'SetStateAction<Date | Date[] | undefined>'.ts(2345)

when I check the declaration file of the calendar component I found that the interface CalendarChangeParams contains the value propriety which may have a null I tried to change this and I removed the null option it works fine so thank you, for verifying this issue.

###Defect Fixes
When submitting a PR, please also create an issue documenting the error.

###Feature Requests
Due to company policy, we are unable to accept feature request PRs with significant changes as such cases has to be implemented by our team following our own processes.
Smaller scaled feature implementations such as adding a property to a component will be considered for merging.

 I m following this demo    [https://codesandbox.io/s/hejhs?file=/src/demo/CalendarDemo.tsx:2121-2154](url)   which contains some errors  in all    setDate hooks  like this one  setDate8(e.value) 

 here is the error description 

 CalendarChangeParams.value: Date | Date[] | null | undefined
Argument of type 'Date | Date[] | null | undefined' is not assignable to parameter of type 'SetStateAction<Date | Date[] | undefined>'.
  Type 'null' is not assignable to type 'SetStateAction<Date | Date[] | undefined>'.ts(2345)

when I check the declaration file of the calendar component I found that the interface CalendarChangeParams contains the value propriety which may have a null I tried to change this and I removed the null option it works fine so thank you,  for verifying this issue.
@mcantonbul
Copy link

#2057 I also got this error.

@mertsincan mertsincan merged commit 64c750a into primefaces:master Jun 6, 2021
@mertsincan
Copy link
Member

Hi @TrabelsiHoussem, Thanks a lot for your contribution!

Best Regards,

@TrabelsiHoussem TrabelsiHoussem deleted the patch-2 branch June 7, 2021 07:59
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

Successfully merging this pull request may close these issues.

3 participants