import {FormDateRangeField} from "ui";
import {ArgsTable, Meta, Story} from "@storybook/addon-docs";
<Meta
title="Components/Inputs/FormDateRangeField/old"
component={FormDateRangeField}
/>
export const Template = (args) => (
<FormDateRangeField
{...args}
value={args.value && args.value !== 0 ? args.value : undefined}
/>
);
# FormDateRangeField
This component renders an FormDateRangeField.
## Props
<ArgsTable story="Default"/>
## Examples
<Story
name="Default"
args={{
id: "example",
label: "Label",
labelIcon: "funnel",
placeholder: "Placeholder text",
value: {
startDate: new Date(),
endDate: new Date()
},
singleDate: false,
defaultValue: {
startDate: new Date(),
endDate: new Date()
},
onChange: () => {
},
required: true,
minLength: 0,
maxLength: 100,
pattern: "",
patternText: "Did not match pattern",
disabled: false,
type: "text",
caption: "",
warning: true,
warningDaysInPast: 0,
warningDaysInFuture: 30,
}}
>
{Template.bind({})}
</Story>
Comments