Comments (5)
Can you provide a stackblitz link please ?
https://stackblitz.com/edit/vitejs-vite-1hvojf?file=src%2FApp.tsx
from primereact.
Can you provide a stackblitz link please ?
from primereact.
OK so it works for me in TypeScript here: https://stackblitz.com/edit/kd3h15?file=src%2FApp.tsx
i think the issue is the Calendar detects the value
and sets the SelectionMode based on whether you pass it a single Date, a Date[] array, etc.
See here:
primereact/components/lib/calendar/calendar.d.ts
Lines 972 to 1041 in 686262f
from primereact.
OK so it works for me in TypeScript here: https://stackblitz.com/edit/kd3h15?file=src%2FApp.tsx
i think the issue is the Calendar detects the
value
and sets the SelectionMode based on whether you pass it a single Date, a Date[] array, etc.See here:
primereact/components/lib/calendar/calendar.d.ts
Lines 972 to 1041 in 686262f
The issue starts when I try to wrap the Calendar with a wrapping component.
https://stackblitz.com/edit/kd3h15-yfszte?file=src%2FApp.tsx
I tried, passing it a value and an onChange to see if it works, but the typing error still persists. Strange behavour, in theory it should work the same whether the component gets wrapper or not, right?
from primereact.
It should it might be some TypeScript weirdness or magic that I don't know.
from primereact.
Related Issues (20)
- Dropdown: No longer shows options with simple primitive values HOT 1
- InputOtp: Setting Value does not clear display
- Password > Icon and Input render order > tabIndex issue HOT 1
- Typo error on the Theming page HOT 1
- DataTable: re-order + resizable fails HOT 2
- Typo error on `PrimeFlex` section of the Theming documentation HOT 1
- Readme typo HOT 1
- Sidebar: Headless Sidebar is hidden in Small and Medium-Sized Views HOT 1
- PanelMenu MenuItem Id Prop Not Passed
- DataTable: Row groups are duplicated when the groupRowsBy value is changed
- onSort return only one value on every event HOT 2
- MeterGroup: Percentages always based on max 100 HOT 3
- DataTable Dropdown Filter: Value is not getting updated upon selection HOT 4
- Chart property "onMouseDown" not typed HOT 1
- TabView | Inkbar is visible for lara
- Option with value 0 has different behavior than any other number in dropdown HOT 6
- Cannot npm link primereact on local project
- DataTable: Clicking on a checkbox in the header of a sortable column will sort the column HOT 2
- FileUpload: How can I preload a file into the component?
- Password component width class w-full HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from primereact.