Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions components/doc/calendar/basicdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ export function BasicDoc(props) {

const code = {
basic: `
<Calendar value={date} onChange={(e) => setDate(e.value)} />
<Calendar
value={date}
onChange={(e) => setDate(e.value)}
appendTo={typeof window !== 'undefined' ? document.body : null}
/>
`,
javascript: `
import React, { useState } from "react";
Expand All @@ -19,7 +23,11 @@ export default function BasicDemo() {

return (
<div className="card flex justify-content-center">
<Calendar value={date} onChange={(e) => setDate(e.value)} />
<Calendar
value={date}
onChange={(e) => setDate(e.value)}
appendTo={typeof window !== 'undefined' ? document.body : null}
/>
</div>
)
}
Expand All @@ -34,7 +42,11 @@ export default function BasicDemo() {

return (
<div className="card flex justify-content-center">
<Calendar value={date} onChange={(e) => setDate(e.value)} />
<Calendar
value={date}
onChange={(e) => setDate(e.value)}
appendTo={typeof window !== 'undefined' ? document.body : null}
/>
</div>
)
}
Expand All @@ -49,7 +61,7 @@ export default function BasicDemo() {
</p>
</DocSectionText>
<div className="card flex justify-content-center">
<Calendar value={date} onChange={(e) => setDate(e.value)} />
<Calendar value={date} onChange={(e) => setDate(e.value)} appendTo={typeof window !== 'undefined' ? document.body : null} />
</div>
<DocSectionCode code={code} />
</>
Expand Down
Loading