Closed alicewriteswrongs closed 8 years ago
ok so basically I tried out the react equivalent of fullcalendar, and it's missing way too many features to be useful.
so we're sticking with the jquery calendar, and using the react form (which lives in a bootstrap modal). Basically if we want the calendar callbacks (like select
and eventClick
and so on) to correctly update the form (so that you're e.g. editing the info for the right event) we need to add some hidden form fields. Basically these fields exist just to be programmatically filled in inside of the fullcalendar callback.
the process looks like:
eventID
fieldeventID
inputonIdChanged
)this.props.formData
on the store, and then sets the eventID
field to be the correct event ID (we get this for free in the fullcalendar callback).eventFormStore
fetches all the form data corresponding to the right eventID
sticks it into this.props.formData
whew
rn basically all of the frontend stuff for this process is in place except for the store fetching event data.
side note: we can do a thing similar to what is described above in order to fill in the right date, or right start and end times, when you click on something.
it's done! things work!
it's a bit hacky,
ok it's quite hacky.
jquery + react = pain
the worst part is having to wrap a call to one of the actions in setTimeout( function () {})
...
weee
blech