apoc-calendar
v0.2.1
Published
calendar
Downloads
9
Readme
apoc-calendar
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: {...},
});