Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] - fix date widget #709

Closed
wants to merge 2 commits into from
Closed

[WIP] - fix date widget #709

wants to merge 2 commits into from

Conversation

cekk
Copy link
Member

@cekk cekk commented Apr 17, 2019

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.

@tisto
Copy link
Member

tisto commented Nov 5, 2019

There are tons of React widget options. We used the AirBnB datepicker in some projects and had good experience with it.

New events should have the date set to now. I guess this is something the Volto frontend could provide.

@sneridagh
Copy link
Member

@cekk @pnicolli what's the status here? There is also another approach by @nzambello ?

@pnicolli
Copy link
Contributor

@sneridagh I know @nzambello had something going on, but I'm actually not well informed on that. On the other hand, we will for sure need to make sure events are fully working in the next few weeks, so we definitely have this on the radar. We'll let you know.

@nzambello nzambello mentioned this pull request Jan 28, 2020
@sneridagh
Copy link
Member

@pnicolli @cekk This is superseeded, right? Close it at will

@pnicolli pnicolli closed this Feb 14, 2020
@tisto tisto deleted the cekk_fix_date_widget branch April 13, 2021 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants