Home > Web Front-end > JS Tutorial > Lightweight native js calendar plug-in calendar.js usage guide_javascript skills

Lightweight native js calendar plug-in calendar.js usage guide_javascript skills

WBOY
Release: 2016-05-16 16:01:58
Original
2064 people have browsed it

Instructions for use:

Need to introduce the plugin calendar.js/calendar.min.js

You need to introduce the calendar.css style sheet to customize the skin you want

This calendar plug-in supports cmd modularity

Call as follows:

Copy code The code is as follows:

xvDate({
'targetId':'date1',//The id of the time writing object
'triggerId':['date1','dateBtn1'],//The object id that triggers the event
'alignId':'datesWrap1',//Calendar alignment object
'format':'-',//Time format default 'YYYY-MM-DD HH:MM:SS'
'min':'2014-09-20 10:00:00',//Maximum time
'max':'2014-10-30 10:00:00'//Minimum time
});

Parameter description:

targetId: The id of the date writing object, cannot be empty
triggerId: The object ID that triggers the event. If not set, the default is targetId
alignId: The alignment base of the calendar box. If not set, it defaults to targetId
hms: Whether the hours, minutes and seconds are turned on. The default value is 'on', which means to turn on the hours, minutes and seconds (2014-09-20 10:00:00), and 'off', which means to turn off the hours, minutes and seconds mode (2014-09-20)
format: Date format. The default value is '-' (2014-09-20), '/' means (2014/09/20)
min: Minimum time limit, the time format of min remains the same as the previous time format
max: maximum time limit, the time format of max remains the same as the previous time format
zIndex: maximum time limit, calendar box level, default 9999

If you need to use modularization, just import the modules you need to depend on

For example:

Copy code The code is as follows:

define('mod1',[],function(require, exports, module){
var xvDate = require("xvDate");
})

Download address

The above is the entire content of this article, I hope you all like it.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template