Skip to content

Commit

Permalink
Updated: Date Picker component updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arifulislam5577 committed Mar 24, 2024
1 parent ea899d0 commit e978b6c
Show file tree
Hide file tree
Showing 27 changed files with 307 additions and 1,553 deletions.
282 changes: 0 additions & 282 deletions app/components/ComponentsList.tsx

This file was deleted.

67 changes: 16 additions & 51 deletions app/docs/components/datePicker/DatePicker.mdx
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
import { DefaultDatePicker, DefaultDatePickerCode } from './variant/DefaultDatePicker'
import { DatePickerWithTwoMonth, DatePickerWithTwoMonthCode } from './variant/DatePickerWithTwoMonth'
import { MultipleDatePicker, MultipleDatePickerCode } from './variant/MultipleDatePicker'
import { DateRangePicker, DateRangePickerCode } from './variant/DateRangePicker'
import { DateRangePickerWithTwoMonth, DateRangePickerWithTwoMonthCode } from './variant/DateRangePickerWithTwoMonth'
import { MonthPicker, MonthPickerCode } from './variant/MonthPicker'
import { YearPicker, YearPickerCode } from './variant/YearPicker'
import { TimePicker, TimePickerCode } from './variant/TimePicker'
import { DatePickerApiData } from './DatePickerApi'
import { DateRangePicker2, DateRangePicker2Code } from './variant/DateRangePickerWithTwoMonth'

import CodePreview from '../../../components/CodePreview'

import ComponentApi from '../../../components/ComponentApi'

## Table of Contents
Expand All @@ -17,66 +12,36 @@ The Date Picker component offers an intuitive way for users to select dates from

## Default Date Picker

The DefaultDatePicker component is a simple implementation of a date picker component. It display a single date selection interface. Users can choose a date, and the selected date is managed using state.
The Default Date Picker component provides a simple interface for selecting a single date. Users can choose a date, and the selected date is managed using state.

<CodePreview github="DatePicker" code={DefaultDatePickerCode}>
<DefaultDatePicker />
</CodePreview>

## Date Range Picker

A Date Range Picker is a user interface component that allows users to select a range of dates, typically represented by a start date and an end date.

<CodePreview github="DatePicker" code={DateRangePickerCode}>
<DateRangePicker />
</CodePreview>

## DatePicker With Two Month

The `DatePicker` component has been enhanced with an additional feature that allows users to view and select dates from two consecutive months simultaneously. This feature is enabled by setting the `showTwoMonth` prop to `true`.

<CodePreview github="DatePicker" code={DatePickerWithTwoMonthCode}>
<DatePickerWithTwoMonth />
</CodePreview>

## Date Range Picker From Two Month

The `DatePicker` component has been enhanced with an additional feature that allows users to view and select dates from two consecutive months simultaneously. This feature is enabled by setting the `showTwoMonth` prop to `true`.

<CodePreview github="DatePicker" code={DateRangePickerWithTwoMonthCode}>
<DateRangePickerWithTwoMonth />
</CodePreview>

## Month Picker
## Multiple Date Picker

A Month Picker is a user interface component that allows users to select a specific month and year from a calendar-like interface.
The Multiple Date Picker allows users to view and select dates from multiple months. You can customize the number of months displayed using the `numberOfMonths` prop.

<CodePreview github="DatePicker" code={MonthPickerCode}>
<MonthPicker />
<CodePreview github="DatePicker" code={MultipleDatePickerCode}>
<MultipleDatePicker />
</CodePreview>

## Year Picker
## Date Range Picker

A Year Picker is a user interface component that allows users to select a specific year from a list or dropdown.
The Date Range Picker enables users to select a range of dates. Set the mode prop to `"range"` to enable this functionality.

<CodePreview github="DatePicker" code={YearPickerCode}>
<YearPicker />
<CodePreview github="DatePicker" code={DateRangePickerCode}>
<DateRangePicker />
</CodePreview>

## Time Picker
## Multiple Month Date Picker

A Time Picker is a user interface component that allows users to select a specific time, usually down to the hour and minute, from a set of available options.
The Multiple Month Date Picker lets users select date ranges spanning across multiple months.

<CodePreview github="DatePicker" code={TimePickerCode}>
<TimePicker />
<CodePreview github="DatePicker" code={DateRangePicker2Code}>
<DateRangePicker2 />
</CodePreview>

## API Reference

Explore the available props for the date picker component

<ComponentApi data={DatePickerApiData} />

## Reference

To learn more about the Date Picker, please see the documentation of [React Date Picker](https://reactdatepicker.com/)
For further details and advanced usage, refer to the documentation of [React Day Picker](https://react-day-picker.js.org/)
Loading

0 comments on commit e978b6c

Please sign in to comment.