You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I'm getting error The value defined for prop 'value' must be of type 'Date' when passing a string to a prop of type Date. Shouldn't it be parsed the Date object when a string is given since 1.73.0?
Hi @efoken , sorry for not responding earlier. Atomico has improved the types by allowing transformations by instance if it is not covered by Atomico, but this only covers inputs as attributes.
To force Atomico to allow input via attributes, you can use the "$" prefix, for example:
<my-component$date="2023-03-11"/>
... Now I think it would be useful in the future to add logic that allows working together with props that have both string and non-string inputs. For example, if the type is declared as Number and it receives "0", the output would be 0. What do you think about what was mentioned?
Describe the bug
I'm getting error
The value defined for prop 'value' must be of type 'Date'
when passing a string to a prop of type Date. Shouldn't it be parsed the Date object when a string is given since 1.73.0?I tried this within Storybook.
Here's my simplified DatePicker component:
Browser (please complete the following information):
To Reproduce
Steps to reproduce the behavior:
value
prop of typeDate
<my-date-picker value="2023-09-22">
Expected behavior
String value should be parsed to a Date.
The text was updated successfully, but these errors were encountered: