From 9c3169e396a07ace619eb811bfe11755b5ad79c1 Mon Sep 17 00:00:00 2001 From: anuraghazra Date: Fri, 10 May 2024 12:08:56 +0530 Subject: [PATCH] chore: update api --- .../DatePicker/_decisions/decisions.md | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/packages/blade/src/components/DatePicker/_decisions/decisions.md b/packages/blade/src/components/DatePicker/_decisions/decisions.md index d0e88ea39a7..25c18872f5d 100644 --- a/packages/blade/src/components/DatePicker/_decisions/decisions.md +++ b/packages/blade/src/components/DatePicker/_decisions/decisions.md @@ -165,6 +165,44 @@ type CalendarProps = { }; ``` +## Examples + +### Controlled DatePicker + +```jsx +function ControlledDatePicker() { + const [selectedDate, setSelectedDate] = React.useState(new Date()); + + return ( + + ); +} +``` + +### DatePicker Presets + +```jsx +function DatePickerWithPresets() { + return ( + + ); +} +``` +
Alternative Approaches