x-calendar

A js calendar library, whick can pick time, day, week or month

Usage no npm install needed!

<script type="module">
  import xCalendar from 'https://cdn.skypack.dev/x-calendar';
</script>

README

calendar

a js calendar library, whick can pick day, week or month

Preview

Installation

npm install x-calendar --save

Usage

  1. Import: import Calendar from 'x-calendar' or const Calendar = require('x-calendar')

  2. Initialize the calendar let calendar = new Calendar(el, options)

-el always an input tag -options

   options = {
      monthNames: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
      dayNames: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
      dayStart: 0,
      date: now,
      pickerCb () {},
      renderCb () {},
      type: 'day',
      selectMode: { type: ['day'] },
      disablePast: false,
      disableFuture: false,
      rangeEnd: '2018-03-28',
      rangeBegin: '2018-03-25',
      timePick: false,
      defaultFill: true,
      align: 'left',
      disableSelect: false,
      currentDay: '2018,03,25'
  }