jpmorganchase / salt-ds

React UI components built with a focus on accessibility, customization and ease-of-use
https://www.saltdesignsystem.com
Apache License 2.0
120 stars 88 forks source link

Date picker to control input values from external state #3712

Open origami-z opened 2 months ago

origami-z commented 2 months ago

Area

UI Components

The problem

Have been trying to integrate @salt-ds/lab DatePicker component with React-Hook-Form.

Below is the implementation for controlled DatePicker with React-Hook-Form.

Point to consider :

https://stackblitz.com/edit/salt-template-emlnbf?file=App.tsx

The solution

Enable startDateStringValue and endDateStringValue to be controlled props in DateInput ?

Alternatives and examples

-

Are you a JPMorgan Chase & Co. employee?

mark-tate commented 1 month ago

now part of ongoing date picker work