Open jonathanpglick opened 5 years ago
Very good point, I’m not sure yet on how to fix that.
After some further thinking, I still don’t see how react-streamfield can be adjusted to handle that without a major refactoring.
We may support that edge case in the future, but for now I suggest making an <input type="datetime" />
or something in JavaScript.
For information, did it work on the “old” StreamField?
Thanks for actually responding and thinking about this issue! My actual use case wasn't a datetime field but a 3rd party field (AnyUrlField ) that provides a multi-value field.
I got it working fine without wagtail-react-streamfield so I'll just use the "old" StreamField for now.
I'm creating a
StructBlock
with a DjangoSplitDateTimeField
form field like this:So I implemented the
SplitDateTimeBlock()
to wrap theSplitDateTimeField
like this:But
SplitDateTimeField
extends fromMultiValueField
and it seems to be causing an error. When I click to add theEventBlock
I get a javascript error (below) and the page goes blank.Do you know why this is happening? Is there a way to get wagtail react streamfield to support FieldBlocks based on MultiValueField form fields?