1.0.5 • Published 12 months ago

modsen-datepicker v1.0.5

Weekly downloads
-
License
ISC
Repository
-
Last release
12 months ago

Date Picker library for React

Stylish Date Picker with built-in ToDo-list for React

npm.io

Storybook

Here you can see the possibilities of date picker library and options for settings.

Installation

$ npm install modsen-datepicker --save

Usage

To get started, you need to import the DatePicker or RangeDatePicker component from the modsen-datepicker library.

import { DatePicker, RangeDatePicker } from 'modsen-datepicker';

const App = () => {
	return (
		<>
			<DatePicker />
			<RangeDatePicker />
		</>
	);
};

Configuration

Getting date from Date Picker:

import { useState } from 'react';
import { DatePicker } from 'modsen-datepicker';

const App = () => {
	const [value, setValue] = useState();

	return <DatePicker onChange={(date) => setValue(date)} />;
};

Props for Date Picker

Prop nameDescriptionAvailable valuesDefault value
typeSets the calendar view'month', 'year''month'
weekStartSets the day on which the week starts'monday', 'sunday''monday'
minDateValueSets the minimum date that will be available in the calendarString value in format 'mm.dd.yyyy''01.01.1900'
maxDateValueSets the maximum date that will be available in the calendarString value in format 'mm.dd.yyyy''31.12.2025'
onChangeFunction called when the user enters date in date input or picks date in calendar(value) => setVAlue(value)-

Additional props for Range Date Picker

Prop nameDescriptionAvailable valuesDefault value
startDateValueSets default start dateString value in format 'mm.dd.yyyy'-
endDateValueSets default end dateString value in format 'mm.dd.yyyy'-
onRangeInputChangeFunction called when the user enters date in date input or picks date in calendar(value) => setVAlue(value)-

Browser Support

The date picker is compatible with the latest versions of Chrome, Firefox, and IE10+.

1.0.5

12 months ago

1.0.4

12 months ago

1.0.3

12 months ago

1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago