Skip to content

BUGFIX: Format DateTime in DatePicker#24

Open
Sebobo wants to merge 1 commit intomainfrom
bugfix/format-datepicker-value
Open

BUGFIX: Format DateTime in DatePicker#24
Sebobo wants to merge 1 commit intomainfrom
bugfix/format-datepicker-value

Conversation

@Sebobo
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown

Closes #28

@bwaidelich bwaidelich removed their request for review January 17, 2024 14:46
name = ${elementName}
value = ${elementValue}
value.@process.format = ${Date.format(value, 'Y-m-d')}
value.@process.format.@if.isDateTime = ${Type.className(elementValue) == 'DateTime'}
Copy link
Copy Markdown
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