Skip to content

Omit datetime from JSON conversion that converts from strings#19807

Merged
AndyButland merged 4 commits intomainfrom
v16/bugfix/textstring-dates
Aug 1, 2025
Merged

Omit datetime from JSON conversion that converts from strings#19807
AndyButland merged 4 commits intomainfrom
v16/bugfix/textstring-dates

Conversation

@Migaroez
Copy link
Contributor

Prerequisites

  • I have added steps to test this contribution in the description below

Fixes #19360

Description

This PR removes jsonobject of type text to DateTime conversion.
I think we can do this as none of the valueEditors that touch deal with Date(time) values require the object passed in to be of type DateTime.
@ronaldbarendse Could you give your 2 cents regarding deploy and the following issue pr?
#16732

Testing

See reproduction steps in 19360, test both in and outside of blocks/elements
See if you can find something that breaks with this code gone. I couldn't

@AndyButland
Copy link
Contributor

AndyButland commented Jul 29, 2025

Just to add some further detail: this was added in #13537 - the updates from @ronaldbarendse in his PR linked above was just to extend the date conversion to handle DateTimeOffset as well. @Zeegaan - you had a hand in this PR that actually adds this class - quite some time back - but maybe you recall some background and whether this is a concern to remove?

Copy link
Contributor

@AndyButland AndyButland left a comment

Choose a reason for hiding this comment

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

I don't see any issues with setting, persisting and retrieving dates following this change. Have checked:

  • Setting values in a date picker on a document
  • Setting values in a date picker in a block
  • Setting values in a date picker in a block within an RTE
  • Setting scheduled publishing

Can also confirm the linked issue is resolved.

Holding off on the "Approve" button for now in case of further feedback or concern on removing this update.


I note one failing E2E test too. I've re-triggered it in case it's a flaky one but if it fails a second time would be worth investigating to see if this update is related.

@AndyButland AndyButland changed the title V16/bugfix/textstring dates Omit datetime from JSON conversion that converts from strings Aug 1, 2025
@AndyButland AndyButland enabled auto-merge (squash) August 1, 2025 11:11
@AndyButland AndyButland merged commit de64c53 into main Aug 1, 2025
25 checks passed
@AndyButland AndyButland deleted the v16/bugfix/textstring-dates branch August 1, 2025 11:27
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.

When entering a date value in textstring it gets parsed as a real date with time

2 participants