We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee103b5 commit 3d69379Copy full SHA for 3d69379
packages/ra-ui-materialui/src/input/DateInput.stories.tsx
@@ -23,6 +23,23 @@ export const Basic = ({
23
</Wrapper>
24
);
25
26
+export const OnChangeValidation = ({
27
+ dateInputProps = {
28
+ validate: value => {
29
+ console.log({ value });
30
+ return undefined;
31
+ },
32
33
+ simpleFormProps = { mode: 'onChange' },
34
+}: {
35
+ dateInputProps?: Partial<DateInputProps>;
36
+ simpleFormProps?: Partial<SimpleFormProps>;
37
+}) => (
38
+ <Wrapper simpleFormProps={simpleFormProps}>
39
+ <DateInput source="publishedAt" {...dateInputProps} />
40
+ </Wrapper>
41
+);
42
+
43
export const NonFullWidth = () => (
44
<Wrapper>
45
<DateInput source="published" fullWidth={false} />
0 commit comments