1.2.2 • Published 3 years ago

@sabasayer/calendar v1.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@sabasayer/calendar

Basic one day calendar.

Usage

Use calendar-day component for one day.

<calendar-day
  @item-click="itemClicked"
  @item-drop="itemDrop"
  @item-resize="itemResize"
  @area-select="areaSelect"
  header="My Day"
  :start-time="startTime"
  :end-time="endTime"
  :events="events"
  :hour-height="hourHeight"
  :minute-interval="minuteInterval"
  :hour-padding-right="20"
  :is-area-selectable="true"
/>

events:

interface CalendarEvent<T = undefined> {
  id: string | number;
  /**
   * timeSpan
   */
  from: string;
  /**
   * timeSpan
   */
  to: string;
  title: string;
  /**
   * valid css color
   */
  color: string;
  borderColor?: string;
  textColor?: string;
  isBordered?: boolean;
  borderRadius?: string;
  /**
   * Effects render with collided items 
   */
  position: EnumCalendarDayItemPosition;
  /**
   * Must be bigger then zero
   */
  zIndex: number;

  isClickable?: boolean;
  isDraggable?: boolean;
  isResizable?: boolean;

  /**
   * Data for customization
   */
  detail?: T;
}

Props

    hasHeader: boolean;
    startTime?: string;
    endTime?: string;
    hourHeight: number;
    isHoursVisible: boolean;
    isMinutesVisible: boolean;
    Header?: string;
    events: CalendarEvent[];
    horizontalMarginBetweenItems: number;
    minuteInterval: number;
    hourPaddingRight: number;
    isActionsDisabled: boolean;
    isMinutesClickable: boolean;
    isAreaSelectable: boolean;
    newItemPosition: EnumCalendarDayItemPosition;

Slots

Project setup

yarn install

Compiles and hot-reloads for development

yarn serve

Compiles and minifies for production

yarn build

Run your unit tests

yarn test:unit
1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.25

3 years ago

1.0.24

3 years ago

1.0.23

3 years ago

1.0.22

3 years ago

1.0.21

3 years ago

1.0.20

3 years ago

1.0.19

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago