-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add dateinterval type reference #4817
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
Conversation
MisatoTremor
commented
Jan 13, 2015
•
edited
Loading
edited
Q | A |
---|---|
Doc fix? | no |
New docs? | yes |
Applies to | 3.2 |
Fixed tickets | #4816 |
| with_seconds | ``Boolean`` | The value of the `with_seconds`_ option. | | ||
+--------------+-------------+-----------------------------------------------------------------+ | ||
| with_invert | ``Boolean`` | The value of the `with_invert`_ option. | | ||
+--------------+-------------+-----------------------------------------------------------------+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use the "simple" table syntax:
============== =========== ======================================
Variable Type Usage
============== =========== ======================================
``widget`` ``mixed`` The value of the `widget`_ option.
``with_years`` ``boolean`` The value of the `with_years`_ option.
and so on
============== =========== ======================================
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Changed it like @javiereguiluz said. |
…m type (MisatoTremor) This PR was merged into the 3.2-dev branch. Discussion ---------- [Form][FrameworkBundle][Bridge] Add a DateInterval form type | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #13389 | License | MIT | Doc PR | symfony/symfony-docs#4817 Replaces #15030 Commits ------- f7669be [Form] Add a DateInterval form type Also add dateinterval widget to twig templates.
symfony/symfony#16809 (comment) is merged now, can a maintainer please remove "On hold" label? @MisatoTremor What the status here? |
32e42c2
to
1883265
Compare
@HeahDude |
| Options | - `days`_ | | ||
| | - `placeholder`_ | | ||
| | - `hours`_ | | ||
| | - `input`_ | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like something went wrong here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed read_only field reference, build now runs successfully.
@xabbuh What do you mean with this line comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MisatoTremor When I reviewed this earlier today the diff looked completely broken. Looks like this was related to my browser then or the issue disappeared with your push. So everything's fine here how. :)
1883265
to
f9128ee
Compare
|
||
DateIntervalType Field Type | ||
=========================== | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing a versionadded directive:
.. versionadded:: 3.2
The DateIntervalType field type was introduced in Symfony 3.2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
👍 Thanks for writing the documentation for the feature @MisatoTremor! status: reviewed |
date interval. It can be rendered as a integer or text input or select tags. | ||
|
||
The underlying format of the data can be a ``DateInterval`` object, | ||
a `RFC 3339`_ duration string (e.g. ``P1DT12H``) or an array. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure we want to link to the RFC 3339? In that RFC you can read the following:
It looks like we should link instead to ISO 8601 standard: https://en.wikipedia.org/wiki/ISO_8601
@MisatoTremor thanks for adding this form type and for providing the docs too. Today we've highlighted it in the Symfony blog (see New in Symfony 3.2: DateInterval form type). When writing the blog post, I wondered if this type could be a bit easier to use. In particular, I wonder if the |
f9128ee
to
6ed9ed7
Compare
@javiereguiluz Thanks for the nice highlight! :) I've included the option according to other date/time types, but this indeed sounds like a great improvement. Maybe this could be done for the other types, too. Will look into into |
options are ``input`` and ``widget``. | ||
|
||
Suppose that you have a ``remindEvery`` field whose underlying interval is a | ||
``DateInterval`` object. The following configures the ``dateinterval`` type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... configures the ``DateIntervalType``
Thanks for the work @MisatoTremor - it's a really interesting component! And I'm sorry, I just peppered you with comments :) Status: Needs Work |
6ed9ed7
to
2c5b539
Compare
2c5b539
to
3d55585
Compare
@weaverryan Thank for your review Ryan. I applied all but one which I commented upon. |
Hi @MisatoTremor! I'm sorry for the long delay, seems like this one slipped under our radar. As 3 doc members already reviewed this and you fixed their comments, I assume this one is ready to merge. /cc @symfony/team-symfony-docs status: reviewed |
👍 this is indeed ready to be merged. Thanks @MisatoTremor. |
@wouterj I totally understand this. :) There's much to do and also more important sections. You all are doing a great job! Thanks for the update. |
Thanks Steffen for your work & patience! This is now merged in the docs and will be online tomorrow. |