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
At the moment there is no way to pass values (or field-level error states/CSS classes) to the date-input when using the default item set. This means you have to redefine the items param, including CSS classes for widths, whenever the date-input is used. This encourages repeated code and is arguably more prone to error.
Is it worth having a values param and an errors param on date-input? This could fall back to values/errors passed via the items param for backward compatibility, but favouring the new items/errors props.
I just faced this issue too (when using the Prototyping Kit). It's a requirement when implementing the "Check your answers" pattern, as that allows people to go back and edit their dates, so you need to be able to set the values from their previous answer.
Just faced this issue as well. Would be great if there were an easier way of setting default value - though I appreciate this may be tricky.
In the short term I wonder if the default example / most examples should include the items array - nearly all services will have to have it to be able to let users change existing answers / do validation.
At the moment there is no way to pass values (or field-level error states/CSS classes) to the date-input when using the default item set. This means you have to redefine the items param, including CSS classes for widths, whenever the date-input is used. This encourages repeated code and is arguably more prone to error.
Is it worth having a values param and an errors param on date-input? This could fall back to values/errors passed via the
items
param for backward compatibility, but favouring the newitems
/errors
props.e.g.
I don't have an immediate need for this but it's something I noticed and thought worth suggesting in case others agree.
The text was updated successfully, but these errors were encountered: