Skip to content

Conversation

@zachweix
Copy link
Contributor

@zachweix zachweix commented Aug 5, 2025

WHY

BEFORE - What was wrong? What was happening before this PR?

Users could not choose locale, were forced to use iso format and could not set a custom format

AFTER - What is happening after this PR?

Users have the option of locale, though it still defaults to the app locale or can use an entirely custom format

HOW

How did you achieve that, in technical terms?

You can set the locale on the column or you can set a closure for a format to do it entirely custom. You can have it set a timezone or return a diff instead of a time itself

Is it a breaking change?

No

How can we test the before & after?

You can set a format custom function. I set a column like this:
CRUD::column('created_at')->format(fn($date) => $date->timezone('America/New_York')->toDateTimeString());

If the PR has changes in multiple repos please provide the command to checkout all branches, eg.:

git checkout "dev-branch-name" &&
cd vendor/backpack/crud && git checkout crud-branch-name &&
cd ../pro && git checkout pro-branch-name &&
cd ../../..

@pxpm
Copy link
Contributor

pxpm commented Aug 11, 2025

Love it. ❤️ Clean and simple. I will have a test on it next week and merge it accordingly if everything is ok 👍

Thanks @zachweix 🙏

@pxpm pxpm self-assigned this Aug 11, 2025
@pxpm pxpm added the v7 label Aug 11, 2025
@pxpm pxpm merged commit 6e6c038 into Laravel-Backpack:next Aug 19, 2025
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants