Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
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
MisatoTremor commentedJan 14, 2015
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#4817Replaces#15030Commits-------f7669be [Form] Add a DateInterval form type Also add dateinterval widget to twig templates.
HeahDude commentedJun 22, 2016
symfony/symfony#16809 (comment) is merged now, can a maintainer please remove "On hold" label? @MisatoTremor What the status here? |
32e42c2 to1883265CompareMisatoTremor commentedJun 22, 2016
@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 tof9128eeCompare| 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
wouterj commentedJul 2, 2016
👍 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
javiereguiluz commentedJul 4, 2016
@MisatoTremor thanks for adding this form type and for providing the docs too. Today we've highlighted it in the Symfony blog (seeNew 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 to6ed9ed7CompareMisatoTremor commentedJul 4, 2016
@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``weaverryan commentedJul 10, 2016
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 to2c5b539Compare2c5b539 to3d55585CompareMisatoTremor commentedJul 29, 2016
@weaverryan Thank for your review Ryan. I applied all but one which I commented upon. |
wouterj commentedNov 8, 2016
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 |
javiereguiluz commentedNov 8, 2016
👍 this is indeed ready to be merged. Thanks@MisatoTremor. |
MisatoTremor commentedNov 9, 2016
@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. |
wouterj commentedNov 10, 2016
Thanks Steffen for your work & patience! This is now merged in the docs and will be online tomorrow. |

Uh oh!
There was an error while loading.Please reload this page.