@vladosg155/datepicker-library
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

Getting Started

1. Add datepicker-library to your dependencies:

npm install @vladosg155/datepicker-library # with npm
pnpm install @vladosg155/datepicker-library # with pnpm
yarn add @vladosg155/datepicker-library # with yarn

2. When importing, include the DayPicker CSS in your component:

import {DatePicker} from @vladosg155/datepicker-library
import  "@vladosg155/datepicker-library/dist/index.css"

function  Component()  {
return  <DayPicker  />;
}

3. Props

  • withRange?: // Enables selecting date range
  • viewType?: // Type of calendar view ('month', 'year', 'week') (def: 'month)
  • onChange={(val: string)=>val} // Handler for selected date change
  • withTodos?: // Enables displaying todos on the calendar
  • withMondayFirst?:// Start of the week on Monday
  • activeDate?: // start selectedDate(format: DD/MM/YYYY) - default datepicker
  • DD/MM/YYYY-DD/MM/YYYY - range datepicker
  • maxDate?: Date // max date for datepicker
  • minDate?: Date // min date for datepicker
import {DatePicker} from @vladosg155/datepicker-library
import  "@vladosg155/datepicker-library/dist/index.css"

function  Component()  {
return  <DayPicker
		    withRange
			withTodos
			withMondayFirst
			viewType='month'
			activeDate='12/02/2024/
			maxDate={new Date("DATE")}
			minDate={new Date("DATE")}
			onChange={(val)=>log(val)}
 />;
}

Package Sidebar

Install

npm i @vladosg155/datepicker-library

Weekly Downloads

0

Version

1.0.5

License

none

Unpacked Size

93.4 kB

Total Files

50

Last publish

Collaborators

  • vladosg155