3.3.0 • Published 12 months ago

@wedgekit/date-picker v3.3.0

Weekly downloads
4
License
MIT
Repository
-
Last release
12 months ago

@wedgekit/date-picker

Description

@wedgekit/date-picker provides a calendar and a context provider for coordinating date/time fields when picking dates.

Examples

Single Date

import { DateTimePicker, Date, Time } from '@wedgekit/date-picker';

const Example = () => {
  const [value, setValue] = React.useState('');

  return (
    <DateTimePicker value={value} onChange={setValue}>
      <Date label="Date" />
      <Time label="Time" />
    </DateTimePicker>
  );
};

render(<Example />);

Range

import { DateTimePicker, Date, Time } from '@wedgekit/date-picker';

const Example = () => {
  const [value, setValue] = React.useState([]);

  return (
    <DateTimePicker range value={value} onChange={setValue}>
      <Date label="Start" position="start" />
      <Time label="Time Start" labelHidden position="start" />
      <Date label="End" position="end" />
      <Time label="Time End" labelHidden position="end" />
    </DateTimePicker>
  );
};

render(<Example />);

Props

range

Indicates if the DatePicker value is a range of dates.

Type: boolean

Required: ✅

value

The date value. If range is true it will be a tuple; otherwise it is a single date.

Type: ISO8601String | [ISO8601String, ISO8601String]

Required: ✅

onChange

Callback for when the value changes. If range is true it takes a tuple; otherwise takes a single date.

Required: ✅

Type: (ISO8601String | [ISO8601String, ISO8601String]) => void

timezone

Timezone the value should be displayed in. This will default to the browser's timezone.

Required: ❌

Type: IANA Timezone Name

Further Reading

Documentation for more specialized use cases can be found here

3.2.2

1 year ago

3.2.2-tc.o

12 months ago

3.3.0

12 months ago

3.2.2-tc.1

1 year ago

3.2.2-tc.2

1 year ago

3.2.2-tc.0

1 year ago

3.3.2-tc.0

12 months ago

3.1.1-tc.0

2 years ago

3.1.1-tc.1

2 years ago

3.2.1

1 year ago

3.2.0

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago

3.2.0-tc.0

1 year ago

3.0.0

2 years ago

3.0.1-tc.7

2 years ago

3.0.1-tc.6

2 years ago

3.0.1-tc.9

2 years ago

3.0.1-tc.8

2 years ago

3.0.1-tc.3

2 years ago

3.0.1-tc.2

2 years ago

3.0.1-tc.4

2 years ago

3.0.1-tc.1

2 years ago

3.0.1-tc.0

2 years ago

3.1.1

2 years ago

3.1.0

2 years ago

3.1.2-tc.0

2 years ago

3.0.2-tc.0

2 years ago

3.0.2-tc.1

2 years ago

1.0.0

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

1.0.0-tc.17

2 years ago

1.0.0-tc.16

3 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.0-tc.15

3 years ago

1.0.0-tc.14

3 years ago

1.0.0-tc.11

3 years ago

1.0.0-tc.10

3 years ago

1.0.0-tc.13

3 years ago

1.0.0-tc.12

3 years ago

1.0.0-tc.8

3 years ago

1.0.0-tc.7

3 years ago

1.0.0-tc.9

3 years ago

1.0.0-tc.6

3 years ago

1.0.0-tc.4

3 years ago

1.0.0-tc.5

3 years ago

1.0.0-tc.3

3 years ago

1.0.0-tc.2

3 years ago

1.0.0-tc.1

3 years ago

1.0.0-tc.0

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

4 years ago

0.0.1

4 years ago

0.0.0

4 years ago