The front end of the calendar plugin

layDate date and time component

layDate is one of the three components layui independent maintenance, https: //www.layui.com/laydate/ get layDate download the file package, unpacked and laydate entire folder (do not split structure) to store any of your project directory, use, just introduced laydate.js can be.

Note: If you have used layui page, we strongly recommend that you direct the use of layui built layDate module, do not be replicated as a standalone version of laydate.js, layDate using native JavaScript to write, do not depend on any third-party libraries, compatible (except IE6 / 7) all browsers

Installation npm: npm install layui-laydate

 

// General Usage

laydate.render({elem: '#test1'});

//International Edition

laydate.render ({elem: '# test1-1', long: 'A'});

 

// In selector

laydate.render({elem: '#test2',type: 'year'});

// date selector

laydate.render({elem: '#test3',type: 'month'});

// Time Picker

laydate.render({elem: '#test4',type: 'time'});

// Time Picker

laydate.render({elem: '#test5',type: 'datetime'});

 

// dark green theme

laydate.render({

elem: '#test29',theme: 'molv'});

// custom colors

laydate.render({

elem: '#test30',theme: '#393D49'});

// plaid theme

laydate.render({elem: '#test31',theme: 'grid'});

 

 

Guess you like

Origin www.cnblogs.com/hujun-2018/p/11546740.html