Skip to content
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

BUGFIX: Format DateTime in DatePicker #24

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Sebobo
Copy link
Member

@Sebobo Sebobo commented Mar 10, 2021

Without this change Flow would convert the value to a DateTime object and
an exception occurs when Fusion tries to convert the object to a string value.

@Sebobo Sebobo requested a review from mficzel March 10, 2021 12:30
Copy link
Member

@mficzel mficzel left a comment

Choose a reason for hiding this comment

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

Fine by reading and i use a very similar code in neos/fusion-form. But i am not 100% familiar with this package.

@mficzel mficzel requested a review from bwaidelich March 13, 2021 11:19
@simonhir
Copy link

Closes #28

@bwaidelich bwaidelich removed their request for review January 17, 2024 14:46
@@ -6,6 +6,8 @@ prototype(Neos.Form:DatePicker) < prototype(Neos.Form.FusionRenderer:FormElement
type = 'date'
name = ${elementName}
value = ${elementValue}
[email protected] = ${Date.format(value, 'Y-m-d')}
[email protected][email protected] = ${Type.className(elementValue) == 'DateTime'}
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this instead check against \DateTimeInterface (in order to work for instances of \DateTimeImmutable and custom implementations, too)?

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.

5 participants