8000 [Form] Suggesting a "WeekType" · Issue #32029 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Form] Suggesting a "WeekType" #32029

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

Closed
lsv opened this issue Jun 13, 2019 · 0 comments
Closed

[Form] Suggesting a "WeekType" #32029

lsv opened this issue Jun 13, 2019 · 0 comments

Comments

@lsv
Copy link
lsv commented Jun 13, 2019

Description
It would be very lovely to have a week type.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/week

@fabpot fabpot closed this as completed Nov 3, 2019
fabpot added a commit that referenced this issue Nov 3, 2019
This PR was merged into the 4.4 branch.

Discussion
----------

Add new Form WeekType

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #32029
| License       | MIT
| Doc PR        | <!--symfony/symfony-docs#...--> coming soon

----
#### Update

After the first try, I've updated the field to have more options, and be more "straight".
The field acts like the `DateTimeType` or `TimeType`,  various fields type (pure text, html5 type, select boxes), data validation, ....

For that I took the choice to update the `DateTimeToStringTransformer` and `DateTimeToArrayTransformer` to make them work with weeks format.

I was not sure if it was better to update them or create new ones, WDYT?

Before addind tests and docs, it would be nice to have your first thoughts/comments 😊

Do you need/want a small test repo?

Commits
-------

c4a2f02 Add new Form WeekType
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
0