Skip to content

Note about custom formats and the HTML5 date type #2975

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

Merged
merged 1 commit into from
Oct 2, 2013

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Sep 13, 2013

Q A
Doc fix? yes
New docs? no
Applies to all
Fixed tickets #2973

.. note::

If you want your field to be rendered as a HTML5 date field, you have to use
a ``single_text`` widget and the ``yyyy-MM-dd`` format (the RFC 3339 format).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should note that this is the default format

@xabbuh
Copy link
Member Author

xabbuh commented Sep 13, 2013

Good point, I added a link. Though I chose to link to the HTML version of RFC 3339.

@wouterj
Copy link
Member

wouterj commented Sep 13, 2013

+1 I couldn't find the HTML version :)

weaverryan added a commit that referenced this pull request Oct 2, 2013
Note about custom formats and the HTML5 date type
@weaverryan weaverryan merged commit fcd15aa into symfony:2.2 Oct 2, 2013
weaverryan added a commit that referenced this pull request Oct 2, 2013
@weaverryan
Copy link
Member

Thanks @xabbuh! I expanded on this a bit more in sha: 1b874ce - as I realized our default values were not quite right anymore and our code example didn't make as much sense as it could. I also moved the help message into the included date_format.rst.inc file so that the note shows up for both the date and birthday types. If you see any issues, let me know.

Cheers!

weaverryan added a commit that referenced this pull request Oct 2, 2013
@weaverryan
Copy link
Member

Woops - the duplicate note I left was removed in sha: cc9bccd

@xabbuh xabbuh deleted the issue-2973 branch October 3, 2013 17:38
@xabbuh
Copy link
Member Author

xabbuh commented Oct 3, 2013

Does this also work for the birthday field, @weaverryan?

@weaverryan
Copy link
Member

@xabbuh it should - birthday is just a date with a different year range. I think we typically think of a birthday type as being using with drop-downs, but technically it works for it.

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