1.0.10 • Published 10 months ago

@pusula/calendar v1.0.10

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months 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"
  :minutes-render-start-time="minutesRenderStartTime"
/>

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;
    minutesRenderStartTime?: string;

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.0.10

10 months 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.2

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago