Skip to content

Commit

Permalink
Merge pull request #8844 from elstgav/patch-1
Browse files Browse the repository at this point in the history
Clarify DateField types
  • Loading branch information
slax57 authored Apr 21, 2023
2 parents ee1c6fd + 61e1b7c commit f4335d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/ra-ui-materialui/src/field/DateField.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ describe('<DateField />', () => {

it('should pass the options prop to toLocaleString', () => {
const date = new Date('2017-04-23');
const options = {
const options: Intl.DateTimeFormatOptions = {
weekday: 'long',
year: 'numeric',
month: 'long',
Expand Down
4 changes: 2 additions & 2 deletions packages/ra-ui-materialui/src/field/DateField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ export interface DateFieldProps
extends PublicFieldProps,
InjectedFieldProps,
Omit<TypographyProps, 'textAlign'> {
locales?: string | string[];
options?: object;
locales?: Intl.LocalesArgument;
options?: Intl.DateTimeFormatOptions;
showTime?: boolean;
showDate?: boolean;
}
Expand Down

0 comments on commit f4335d5

Please sign in to comment.