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

feat: unix boolean prop for DateField #9061

Closed
wants to merge 195 commits into from

Conversation

TurtIeSocks
Copy link
Contributor

This adds a unix boolean prop to the DateField component that will multiple a field value by 1000, assuming it is a number.

@fzaninotto
Copy link
Member

Thanks!

As it's a new feature, please rebase your PR against the next branch rather than master, which is reserved for bug fixes.

@TurtIeSocks TurtIeSocks changed the base branch from master to next June 29, 2023 16:16
fzaninotto and others added 27 commits June 29, 2023 12:22
`record` is guaranteed to not be `undefined`, as there’s a falsey check on
line 30. It also must return a viable ReactNode that can be rendered.
@djhi
Copy link
Collaborator

djhi commented Jun 30, 2023

I don't get this. It seems to me it already works. In this sandbox (https://stackblitz.com/edit/github-v5fmzn?file=src%2Fdata.tsx), I changed the dates in the data.ts file to be unix timestamps (using the date valueOf method). Did I miss something?

@fzaninotto
Copy link
Member

This is already working since react-admin 4.11 (see #8863)

@fzaninotto fzaninotto closed this Aug 10, 2023
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.