Skip to content

[Form] BirthdayType has automatic attr when widget is single_text #58871

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

Open
wants to merge 3 commits into
base: 7.4
Choose a base branch
from

Conversation

guillaumeVDP
Copy link
Contributor

@guillaumeVDP guillaumeVDP commented Nov 14, 2024

Q A
Branch? 7.2
Bug fix? no
New feature? yes
Deprecations? no
Issues Fix #58621
License MIT

I change the logic to @stof advises. So I change the vars in the form view with the buildView function instead of using configureOptions function.

I feel that I am doing something wrong since the default value of attr['min'] and attr['max'] are defined with date() function (+ years provided in the options). Final user day can be another one because of his timezone. Is it possible to get the user timezone from there ? Or it's not a big matter ?

@carsonbot carsonbot added this to the 7.2 milestone Nov 14, 2024
@carsonbot carsonbot changed the title [DRAFT] [Form] BirthdayType has automatic attr when widget is single_text [Form] [DRAFT] BirthdayType has automatic attr when widget is single_text Nov 14, 2024
@guillaumeVDP guillaumeVDP force-pushed the birthday_type-single_text branch from 32af7d0 to 60c6ed9 Compare November 14, 2024 13:44
@guillaumeVDP guillaumeVDP force-pushed the birthday_type-single_text branch from 60c6ed9 to ef80577 Compare November 14, 2024 13:50
@guillaumeVDP guillaumeVDP requested a review from stof November 14, 2024 13:53
@stof
Copy link
Member

stof commented Nov 14, 2024

by "user timezone", you mean the timezone that the browser is using when performing the client-side validation ? There is no way to get it as it is something that is not sent to the server.

@stof
Copy link
Member

stof commented Nov 14, 2024

btw, a date does not have a timezone

@guillaumeVDP guillaumeVDP requested a review from stof November 14, 2024 15:43
@guillaumeVDP guillaumeVDP changed the title [Form] [DRAFT] BirthdayType has automatic attr when widget is single_text [Form] BirthdayType has automatic attr when widget is single_text Nov 19, 2024
@OskarStark OskarStark changed the title [Form] BirthdayType has automatic attr when widget is single_text [Form] BirthdayType has automatic attr when widget is single_text Nov 19, 2024
@fabpot fabpot modified the milestones: 7.2, 7.3 Nov 20, 2024
@fabpot fabpot modified the milestones: 7.3, 7.4 May 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BirthdayType with widget single_text is pretty much useless
4 participants