document static property on datepicker modal

This commit is contained in:
Nicco 2021-10-26 14:25:33 +00:00 committed by GitHub
commit 49884b6421

View file

@ -3,10 +3,19 @@ components: ["DatePicker", "DatePickerInput", "DatePickerSkeleton"]
--- ---
<script> <script>
import { DatePicker, DatePickerSkeleton, DatePickerInput } from "carbon-components-svelte"; import { DatePicker, DatePickerSkeleton, DatePickerInput, InlineNotification, CodeSnippet } from "carbon-components-svelte";
import Preview from "../../components/Preview.svelte"; import Preview from "../../components/Preview.svelte";
const modalCodeSnippet = `<DatePicker datePickerType="single" flatpickrProps="{{ static: true }}">
<DatePickerInput />
</DatePicker>"/>`
</script> </script>
<InlineNotification svx-ignore title="Note:" kind="info" hideCloseButton>
<span class="body-short-01">If you are using the DatePicker inside of a Modal you might need to add <code>static</code> to the <code>flatpickrProps</code> as shown below to correct the positioning.</span>
</InlineNotification>
<CodeSnippet type="multi" code={modalCodeSnippet}/>
### Default (simple) ### Default (simple)
<DatePicker> <DatePicker>