Giter VIP home page Giter VIP logo

datepicker's Introduction

datePicker

移动端日期选择组件,压缩后只有几KB

Usage

import:
    import Picker from 'picker.min.js'
    @import "picker.css"
    
直接引入:
    <link href="picker.css" rel="stylesheet" />
    <script src='picker.min.js'></script>

Function

new DatePicker({
    "type": "3", //0年, 1年月, 2月日, 3年月日(默认为3)
    
    "title": '请选择日期', //标题(可选)
    
    "maxYear": "2100",//最大年份(可选)
    
    "minYear": "1900",//最小年份(可选)
    
    "separator": "-",//日期分割符(可选)(默认为'/')
    
    "defaultValue": '',//默认值:根据分隔符分隔开(可选)
    
    "callBack": function (val) {
        //回调函数(val为选中的日期)
        // 可在此处设置显示选中的值
        self.nowVal = val;
    }
});

Demo:

https://xingchou.github.io/pluginApp/dist/index.html#/list/datePicker

datepicker's People

Contributors

xingchou avatar

Watchers

James Cloos 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.