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
[5.1] New Date and Datetime fields #37456
base: 5.1-dev
Are you sure you want to change the base?
Conversation
|
Nice one. Not necessarily something for this PR but would be good to have support for these native inputs:
Oh date time is deprecated: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime#browser_compatibility |
yes
This is DateTime here Unfortunately month and week have bad support by Browsers, probably for another time 😉 |
|
Could you update the description please to be datetime not datetimelocal |
|
What happens with non gregorian calendars? |
Co-authored-by: Brian Teeman <brian@teeman.net>
It only gregorian. It is standart date and datetime-local input, works as described in HTML specs. |
Wich description do you mean? |
|
@brianteeman that is correct. |
|
nice and confusing |
|
I would also deprecate our calendar field in favor of this one. |
it not replacement, because it does not support non gregorian calendars |
|
How do we handle gregorian calendars then? |
I assume you mean "non gregorian". |
|
This pull requests has been automatically converted to the PSR-12 coding standard. |
|
I'm in favor for this PR, we can add a comment to the field that the browser support vor non-gregorian doesn't exists (yet) and the developer must decide if he/she needs it or not. |
|
As long as this is a custom field and core doesnt change to use this field eg for publishing then I 100% agree as stated before. |
Conflicts: libraries/src/Form/Field/TimeField.php
|
This pull request has been automatically rebased to 5.1-dev. |

Summary of Changes
Add 2 new input
date(DateField class), anddatetime-local(DatetimeField class). Fix Time field to support filter.Links to MDN docs:
datetime-local: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-localdate: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/dateTesting Instructions
Add fields in some XML, example in to mod_custom params:
Expected result AFTER applying this Pull Request
Edit the fields, make sure the input works and values stored/displayed corectly
Documentation Changes Required
Add new fields info to list of fields: https://docs.joomla.org/Standard_form_field_types