Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to #632
The problem was on date format: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-local#Setting_timezones
We receive a date like 2019-04-17T10:00:00+00:00 with also timezone info, but datetime-local html field doesn't like timezone anymore.
I needed to convert UTC datetime into local datetime and pass the value without timezone to the input field.
And on change i re-convert the date into UTC for plone.restapi.
I haven't touched the widget to use something better because i don't know what's your plans about date widgets. There are some nice plugins for React.
One other thing: right now a new event has empty dates. In Plone these dates are set as now.
Is it a good idea provide now as default when invoking this widget for event fields?
Also adding a button that sets the date as now like in Plone.