Coder Social home page Coder Social logo

miniprogram-simple-calendar's Introduction

miniprogram-simple-calendar

适用于微信小程序的日历组件

更新

0.0.4

  • 晕死,0.0.3 的代码未打包就 publish 了,这才是 0.0.3 的代码

0.0.3

  • 修复list属性,年月日精确标记日期

0.0.2

  • 添加 list 属性,可标记日期;
  • 添加年月切换时触发 change 事件;
  • 添加 showChangeYear 属性,开启或关闭年份切换

使用

  1. 安装 miniprogram-simple-calendar
npm install --save miniprogram-simple-calendar
  1. 在需要使用 calendar 的页面 page.json 中添加 calendar 自定义组件配置
{
  "usingComponents": {
    "simple-calendar": "miniprogram-simple-calendar"
  }
}
  1. 在 wxml 中使用
<simple-calendar bindselect="select" en="{{en}}" show-other="{{showOther}}"></simple-calendar>

miniprogram-simple-calendar 的属性介绍如下:

属性名 类型 默认值 是否必须 说明
en Boolean false 星期的英文显示
show-other Boolean true 是否显示除了本月的日期
list Array [] list属性传入数组,主要用于标记日期(即日期底部圆点标记),数组中的每一项应含有day属性,结构如:[{day:'2019-01-01'},...],注意2019-01-012019-1-1或者2019-1-01都是标记同一天的,点击日期会返回此日期下的已传入数据
showChangeYear Boolean true 是否允许年份切换,关闭时只保留月份切换

事件:

事件名 说明
select 选中日期时触发
change 切换年或月时触发

miniprogram-simple-calendar's People

Contributors

wungjyan avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

bigmeow

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.