Sorry, but you either have no stories or none are selected somehow.
If the problem persists, check the browser console, or the terminal you've run Storybook from.
Standard HTML attribute for specifying an input field value is required.
Prop | Type | Value |
---|---|---|
name* | string |
|
onChange* | function |
|
required | boolean |
|
value* | string |
|
import React from "react";
import DateInput from "@idesigncode/date-input/DateInput.mjs";
import "@idesigncode/date-input/theme.css";
import "@idesigncode/date-input/layout.css";
const RequiredExample = () => {
const [value, setValue] = React.useState("");
const handleOnChange = (event, formatValue) => {
setValue(formatValue);
};
return (
<DateInput
name="field_name"
onChange={handleOnChange}
required
value={value}
/>
);
};
export default RequiredExample;