# vue-weekly-schedule

> A simple component to show a repeating weekly schedule.

Latest version **0.3.3** (published 2020-01-31) · GPL-3.0 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install vue-weekly-schedule
pnpm add vue-weekly-schedule
yarn add vue-weekly-schedule
bun add vue-weekly-schedule
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.3.3 |
| Published | 2020-01-31 |
| First published | 2019-06-05 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 142 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Arpit Roopchandani |
| Maintainers | arpit9295 |

## Links

- npm: https://www.npmjs.com/package/vue-weekly-schedule
- npm.io page: https://npm.io/package/vue-weekly-schedule

## Dependencies (2)

- [moment](https://npm.io/package/moment.md) ^2.24.0
- [core-js](https://npm.io/package/core-js.md) ^2.6.5

## Recent versions

- 0.3.3 (latest) — 2020-01-31
- 0.3.2 — 2019-06-07
- 0.3.1 — 2019-06-07
- 0.3.0 — 2019-06-06
- 0.2.1 — 2019-06-06
- 0.2.0 — 2019-06-05
- 0.1.0 — 2019-06-05

## README

# vue-weekly-schedule

A simple component to show a repeating weekly schedule.

## Install

```
npm install --save vue-weekly-schedule
```

Use as a plugin -

```js
import Vue from 'vue';
import WeeklySchedule from 'vue-weekly-schedule';

Vue.use(WeeklySchedule); // Adds 'weekly-schedule' component
```

or directly use as a component

```js
import WeeklySchedule from 'vue-weekly-schedule';

export default {
  components: {
    WeeklySchedule,
    ...
  },
  ...
};
```

## Props -

| Prop | Description  | Type  | Default |
|------|--------------|-------|---------|
|schedules*|Array of schedules|Array||
|eventClass|A class you want to attach to each event|String|''|
|showEmptyDays|Toggle showing days which don't have any events to them|Boolean|false|
|showAddBtn|Toggle showing add button|Boolean|false|
|maxEvents|Toggle disabling add button after a max number of events is added|Number|0|
|showLegend|Show legend for the calendars|Boolean|false|

`schedules` expects the following format -
```js
  const schedules = [{
    name: String,
    class: String,
    events: [
      {
        day: Number,
        startTime: String, // 'HH:mm'
        endTime: String, // 'HH:mm'
        class: String,
      },
    ],
  }];
```
The class is added to each event of the schedule.

## Events -

| Event | Description  | Payload  |
|-------|--------------|----------|
|addBtnClick|Emitted when the `+` button is clicked|`Number`, day of add button that was clicked|
|eventClick|Emitted when an event is clicked|`Object`, event object for the clicked event|

## Development setup

```
npm install
```

### Compiles and hot-reloads for development
```
npm run serve
```

### Compiles and minifies for production
```
npm run build
```

### Run your tests
```
npm run test
```

### Lints and fixes files
```
npm run lint
```

## License

[MIT](https://github.com/arpit9295/vue-weekly-schedule/blob/master/LICENSE.md)

---
_Source: https://npm.io/package/vue-weekly-schedule · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
