gpbl / react-day-picker

DayPicker is a customizable date picker component for React. Add date pickers, calendars, and date inputs to your web applications.
https://daypicker.dev
MIT License
5.86k stars 700 forks source link

Unified example code on website regarding useState hooks #2231

Open dave-meyer opened 6 days ago

dave-meyer commented 6 days ago

Description

The previous code examples on the website sometimes used untyped 'useState' hooks. This made it sometimes difficult to understand the code. My changes add strong typing (i.e. useState<Date>()) to wherever the code was not self explanatory.

Also, these changes unify the code examples, since some of them had strongly typed hooks and others did not.

Type of Change

Checklist

Before submitting your pull request, please make sure the following is done:

Linked Issues

None

Test Plan

Not needed

Screenshots (if appropriate)

Not needed

Further Comments

None