1.1.2 • Published 1 year ago

@vgorodkov/date-picker v1.1.2

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

Datepicker

A library to work with calendar

Installation

Install with npm

npm install @vgorodkov/date-picker

Usage/Examples

Datepicker service

import { DatepickerService, withHolidays, withTodos } from '@vgorodkov/date-picker';

function App() {
  const datepickerService = new DatepickerService();
  datepickerService.addDecorator(withTodos);
  datepickerService.addDecorator(withHolidays, [{ day: 3, month: 5, year: 2024 }]);
  const Datepicker = datepickerService.createDatepicker();

  return <Datepicker />;
}

Datepicker

import { Datepicker } from '@vgorodkov/date-picker';

function App() {
  const dateLimit = {
    max: { day: 1, month: 1, year: 2020 },
    min: { day: 1, month: 1, year: 2030 },
  };

  return (
    <Datepicker
      firstDayOfWeek="Su"
      showHolidays={false}
      calendarVariant="month"
      dateLimit={dateLimit}
    />
  );
}

Rangepicker

import { Rangepicker } from '@vgorodkov/date-picker';

function App() {
  const dateLimit = {
    max: { day: 1, month: 1, year: 2020 },
    min: { day: 1, month: 1, year: 2030 },
  };

  return (
    <Rangepicker
      firstDayOfWeek="Su"
      showHolidays={false}
      calendarVariant="month"
      dateLimit={dateLimit}
    />
  );
}

Rangepicker service

import { RangepickerService } from '@vgorodkov/date-picker';

function App() {
  const rangepickerService = new RangepickerService();
  const Rangepicker = rangepickerService.createRangepicker();

  return <Rangepicker />;
}
1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago