codefordenver / encorelink

Connecting musician volunteers with healthcare centers
https://encorelink.herokuapp.com/
ISC License
20 stars 14 forks source link

312 create new event #347

Closed zarrellab closed 7 years ago

zarrellab commented 7 years ago

This PR closes #[312]

Separates an event's date and time out to date, start time, and end time. -CreateEvent validates time input and shows error to user -Separates visualization of times

[https://media.giphy.com/media/JIX9t2j0ZTN9S/giphy.gif]

nlkluth commented 7 years ago

noticing two issues. up to you if you want to follow up in a different PR.

1) Enter start time 12:00 AM. Enter end time 1:00 PM. Change both fields to include bad values (see screenshot). Form no longer works, including when I try to fix bad values.

2) Submitting the form with these bad values does not route, but does create the event. Pushing "Schedule" multiple times ended up with multiple events.

image

zarrellab commented 7 years ago

CreateEvent action now merges the datetimes into original data format, instead of separating out dates and times. This should keep things more persistent with how they were already working.

zarrellab commented 7 years ago

As a note: redux-form was updated to 6.8.0

zarrellab commented 7 years ago

I see that there are proptype errors for date objects. It claims that they are numbers. Should I change the proptype to number, instead of string?