apoc-calendar

0.2.1 • Public • Published

apoc-calendar

npm: apoc-calendar CircleCI: nju33/apoc-calendar Coverage Status tested with jest code style: prettier license: mit

Install

yarn add apoc-calendar
npm i apoc-calendar

Usage

HTML

<script src="path/to/apoc-calendar.js></script>
<script>

const calendar = new ApocCalendar({
  target: document.getElementById('calendar'),
  data: {
		head: (year, month) => `${year}.${month}`
		day: day => switch (day) {
			case 0: {
				return '日';
			}
			case 1: {
				return '月';
			}
			// ...
		},
		min: '2018-1-1',
		max: '2020-12-31',
  },
});

</script>

ES

import ApocCalendar from 'apoc-calendar';

const calendar = new ApocCalendar({
  target: document.getElementById('calendar'),
  data: {...},
});

Readme

Keywords

none

Package Sidebar

Install

npm i apoc-calendar

Weekly Downloads

0

Version

0.2.1

License

MIT

Unpacked Size

851 kB

Total Files

12

Last publish

Collaborators

  • nju33