Skip to content

Latest commit

 

History

History
8 lines (6 loc) · 647 Bytes

README.md

File metadata and controls

8 lines (6 loc) · 647 Bytes

This is a simple DateOfBirthPicker component, built on top of the DatePickerDemo from shadcn/ui. Adds a YearPicker and a MonthPicker to facilitate easier date of birth selection.

Notes

  • To use the DateOfBirthPicker component in a form:
  • Destructure formData and setFormData props inside the component.
  • Un-comment the line which updates formData with the date state from the picker.
  • Create the formData state in the parent component containing the form, and pass formData and setFormData to the DateOfBirthPicker component.