Skip to content

howareyouo/feture-calendar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Feture Calendar 🍦

Picking feture dates.

Demo

Click me!

Screenshot

截图

Usage

<link href="src/feture-calendar.css" rel="stylesheet">
<div id="f-cal"></div>
<script src="src/feture-calendar.js"></script>
<script>
window.addEventListener('load', function () {
  new FetureCalendar(document.getElementById('f-cal'), options)
})
</script>

Default Options

var defaults = {
  months: 3,    // initial months
  max: 12,      // max months
  format: 'mm月dd日',      // dateformat, supports yyyy,mm,dd
  range: ['入住', '离店'],  // range text, if unset, select only one date
  i18n: {
    unit: '晚',
    months: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
    weeks: ['日', '一', '二', '三', '四', '五', '六'],
    today: '今天',
    y: '年',
    m: '月',
    d: '日'
  },
  disablePast: true,
  onSelect: console.log
}

Development

  1. Install dependencies
npm install
  1. Watch JS/CSS
npm run watch

Welcome to feedback for any bugs.

This project was inspired by Vanilla JS Calendar - @chrisssycollins.

About

针对手机屏幕小巧精致的日期选择控件。

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published