Giter VIP home page Giter VIP logo

mobile-calendar's Introduction

mobile-calendar

简易版移动端版日期插件,没第三方库依赖

安装

# 安装 mobile-calendar
npm install --save mobile-calendar

引入方式和使用

<link rel="stylesheet" href="/dist/calendar.min.css">

<script src="/dist/calendar.min.js"></script>

<input type="text" class="calendars" />

API

通过在元素上添加属性的方式

  • start-year 开始年份 String defalut:1915
  • end-year 结束年份 String defalut:2050
  • start-date 起始日期 String defalut:当前日期
  • min-date 起始日期 String defalut:null
  • max-date 起始日期 String defalut:null
  • format 显示的格式 String defalut:'yy/mm/dd' 只支持 yy/mm/dd 或 yy-mm-dd
  • shield 指定禁用日期 Array defalut:undefined 例: shield="[2015/3/8, 2015/3/9]"
  • past 不可选择过去日期 defalut:false 只需要设置属性即可,不需要值
  • hours 可以选择时间 defalut:false 只需要设置属性即可,不需要值
    • hours-past 不可选择过去时间 defalut:false 只需要设置属性即可,不需要值

图片

选择列表
选择列表

左右滑动切换
左右滑动切换

月份选择
月份选择

年份选择
年份选择

左右滑动切换年份列表
左右滑动切换年份列表

mobile-calendar's People

Contributors

gamexg avatar rookie125 avatar rookies125 avatar

Watchers

 avatar

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.