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

refactor: datetime to support custom date and time formats #7091

Merged
merged 20 commits into from
Mar 29, 2024

Conversation

martinjagodic
Copy link
Member

@martinjagodic martinjagodic commented Feb 6, 2024

Solves the problem with time_format in datetime widget described in #7090

Adds back support for picker_utc described in #7132

@martinjagodic martinjagodic marked this pull request as ready for review February 6, 2024 12:48
@martinjagodic martinjagodic requested a review from a team as a code owner February 6, 2024 12:48
@martinjagodic martinjagodic requested review from demshy and removed request for a team and demshy February 6, 2024 12:48
@martinjagodic martinjagodic marked this pull request as draft February 7, 2024 08:58
@martinjagodic
Copy link
Member Author

@demshy fixtures would have to be recorded as base64 blobs change because default datetime format changed.

@privatemaker
Copy link
Contributor

In trying to specify the format: and date_format: values with Day.js Format values as per the Docs, by my understanding this means Day.js has two formats:

  • Normal Formats YYYY-MM-DD
  • Localized Formats LL

However, none of those formatting values change the date display from what is described in #7090

02 / 14 / 2024, 05:20 PM

It would be good to update the Docs with these two differences of formats once this Day.js feature is fixed.

@martinjagodic martinjagodic marked this pull request as ready for review February 15, 2024 10:53
Copy link
Member Author

@martinjagodic martinjagodic left a comment

Choose a reason for hiding this comment

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

I am struggling with this. Anytime i get it to work for a certain scenario, another one stops working. I will focus on other issues for a while and revisit this with fresh eyes.

If anyone else is willing to take a shot you are more that welcome.

@martinjagodic martinjagodic merged commit a07a85b into main Mar 29, 2024
10 checks passed
@martinjagodic martinjagodic deleted the fix-time_format branch March 29, 2024 08:29
yuri-g-taboola referenced this pull request in taboola/decap-cms May 22, 2024
* refactor: datetime to support custom date and time formats

* refactor: improve date formatting

* fix: fix dev test script

* test: update fixtures

* test: set timezone for ci e2e tests

* test: update jest

* fix: work in progress on datetime control

* fix: date and time formatting, handle picker_utc

* fix: remove undefined variable, format

* fix: jest-environment-jsdom version

* refactor: dayjs imports, getFormat and onInputChange functions

* fix: set default value

* fix: lint datetime control

---------

Co-authored-by: Anze Demsar <anze.demsar@p-m.si>
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.

None yet

3 participants