0.1.20 • Published 1 year ago

@codanostra/calendar v0.1.20

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

About

A calendar component that provides calendar functionility without any UI parts. Used to create custom calendars.

Installation

yarn add @codanostra/calendar

Basic Usage

...
import Wrapper from '@codanostra/calendar';

return (
  <Wrapper>{your components that will use this calendar}</Wrapper>
)

Wrapper sets context around around your component (or part of the code that will display the calendar). So, if you need to have multiple calendars on different places you can use multiple wrappers.

Inside your component you can then call:

// Imports:
import { useMonthController,useWeekController, useSelectedDate } from '@codanostra/calendar';
const {
    keys, // return keys for previous, current and next month you can use
    monthForward, // function that sets current month to currenthMonth+1
    monthBack,// function that sets current month to currenthMonth-1
    pagerPosition,
    currentMonth,
    getByOrder,
    nextMonth,
    previousMonth,
    setCurrentMonth,
    setNextMonth,
    setPreviousMonth
    } = useMonthController(); 
0.1.20

1 year ago

0.1.9

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago