mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
* fix(docs): imports missing in DateRangePicker * fix(docs): removed ununused imports in DatePicker --------- Co-authored-by: shrinidhi.upadhyaya <shrinidhiupadhyaya1195@gmail.com>
34 lines
859 B
TypeScript
34 lines
859 B
TypeScript
const App = `import {DatePicker} from "@nextui-org/react";
|
|
import {getLocalTimeZone, today} from "@internationalized/date";
|
|
|
|
export default function App() {
|
|
return (
|
|
<div className="w-full max-w-xl flex flex-row gap-4">
|
|
<div className="w-full flex flex-col gap-1">
|
|
<h3>Min date</h3>
|
|
<DatePicker
|
|
label="Date and time"
|
|
minValue={today(getLocalTimeZone())}
|
|
defaultValue={today(getLocalTimeZone()).subtract({ days: 1 })}
|
|
/>
|
|
</div>
|
|
<div className="w-full flex flex-col gap-1">
|
|
<h3>Max date</h3>
|
|
<DatePicker
|
|
label="Date and time"
|
|
maxValue={today(getLocalTimeZone())}
|
|
defaultValue={today(getLocalTimeZone()).add({ days: 1 })}
|
|
/>
|
|
</div>
|
|
</div>
|
|
);
|
|
}`;
|
|
|
|
const react = {
|
|
"/App.jsx": App,
|
|
};
|
|
|
|
export default {
|
|
...react,
|
|
};
|