Lightweight native js calendar plug-in calendar. js User Guide

Source: Internet
Author: User

Lightweight native js calendar plug-in calendar. js User Guide

The native js calendar code on the webpage. When you click the text prompt, a calendar window with year, month, and date is displayed. You can adjust the year, month, and date, it is used on web pages to help you select dates and improve user experience. All major browsers can run normally. For more information, see.

Instructions for use:

You need to introduce the plug-in calendar. js/calendar. min. js.

You must import the calendar.css style sheet to customize your desired skin.

The calendar plug-in supports cmd modularization.

Call the following code:

The Code is as follows:

XvDate ({

'Targetid': 'date1', // id of the time written to the object

'Triggerid': ['date1', 'datepart1'], // the id of the object that triggers the event

'Alignid': 'dateswrap1', // calendar alignId

'Format': '-', // time format default 'yyyy-MM-DD HH: MM: ss'

'Min': '2017-09-20 10:00:00 ', // maximum time

'Max ': '2017-10-30 10:00:00' // minimum time

});

Parameter description:

TargetId: id of the date written object. It cannot be blank.

TriggerId: the id of the object that triggers the event. If this parameter is not set, the default value is targetId.

AlignId: alignId of the Calendar box. If this parameter is not set, the default value is targetId.

Hms: Indicates whether to enable the time/minute/second mode. The default value is 'on', which indicates that the time/minute/second mode is enabled (10:00:00), and 'off' indicates that the time/minute/second mode is disabled)

Format: the default value of the date format is '-' (). '/' indicates)

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 is consistent with the previous time format.

ZIndex: maximum time limit. The hierarchy of the Calendar box. The default value is 9999.

If you need to use modularization, you can use it to introduce the modules that require dependency.

For example:

The Code is as follows:

Define ('mod1', [], function (require, exports, module ){

Var xvDate = require ("xvDate ");

})

  

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.