kentcdodds / advanced-remix

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

small suggestion: add a default value for date

jimniels opened this issue · comments

Small piece of feedback from doing the workshop.

Whenever I'm testing the "new deposit" functionality in the exercises, I'm constantly having to type in an amount, choose a date, then hit submit. Entering the date can get a bit tiresome.

CleanShot 2022-05-24 at 11 42 07@2x

Maybe you could default it to have a value, that way when you're doing the exercise and testing your code, you don't have to fumble through choosing a date in the UI each time you want to test posting the form data. Something like this here:

<input type="date" defaultValue={new Date().toISOString().slice(0, 10)} />

CleanShot 2022-05-24 at 11 38 18@2x

Ha! And now in the next exercise, I see the value of keeping the date field without a value (for error handling and focus). So I guess disregard this.

Thanks anyway Jim!