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

Plone 6 default "pat-datetime-picker" problems #3603

Open
jensens opened this issue Aug 10, 2022 · 7 comments
Open

Plone 6 default "pat-datetime-picker" problems #3603

jensens opened this issue Aug 10, 2022 · 7 comments

Comments

@jensens
Copy link
Member

jensens commented Aug 10, 2022

pat-datetimepicker

  1. is not documented anywhere pat-datetime-picker is undocumented Patternslib/Patterns#1038
  2. is not backwards compatible with pat-pickadate which means if one used the pattern until 5.2 (or 6.0a4 to b) the editor experience is not the same. Ie. like time is displayed even if pattern setting on widget in Python with `"time": False".
  3. pat-date-picker seems to be the successor?

I don't shed a tear for pat-pickdate. But the new situation is not satisfactory at all.

@jensens
Copy link
Member Author

jensens commented Aug 10, 2022

Furthermore:

I consider this a blocker for any release-candidate of Plone (in fact earlier detected this would have been a blocker for beta too).

cc @mauritsvanrees @esteele

@jensens
Copy link
Member Author

jensens commented Aug 10, 2022

Another one: If in settings -> date time the first day of the week is monday, the datepicker ignores it and still shows sunday.

That said: If I use a DateField with DateFieldWidget uses pat-date-picker (first day of week ignored too).

@petschki
Copy link
Member

petschki commented Aug 10, 2022

My previous assumption that date-picker is the successor of datetime-picker is not correct.
Here are some facts:

  • pat-date-picker is the patternslib implementation of Pikaday (https://www.npmjs.com/package/pikaday) with some options to enable a date picker for <input type="date" /> fields. in plone.app.z3cform this is automatically wired for schema.Date Fields. Unfortunately the import in mockup is missing, so no effect.

  • pat-datetime-picker is used per default for schema.Datetime Fields and (used to) generate 2 fields

    • date field which reuses pat-date-picker logic
    • time field with basic (native) time input

But now with this commit Patternslib/Patterns@b14503d datetime-picker checks for browser native date picker support and skips the logic completely, regardless of the pattern_option you set (https://github.com/Patternslib/Patterns/blob/master/src/pat/datetime-picker/datetime-picker.js#L26).

@jensens
Copy link
Member Author

jensens commented Aug 10, 2022

I guess this need some additional brain cycles to fix. What is our default use case? What are additional use cases?

@petschki
Copy link
Member

Maybe @thet can give some insights, what the future plans for pat-datetime-picker are. For now I'm good with native behavior only.

@jensens
Copy link
Member Author

jensens commented Aug 10, 2022

Well, I need the "today" button for both. And it would be cool if it would start with monday.

Why do we need this imported in Mockup btw?

@erral
Copy link
Member

erral commented Jun 15, 2023

The date-picker language is wrong too:

plone/mockup#1328

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants