Daterangepicker calendar plug-in parameter attention, daterangepicker calendar

Source: Internet
Author: User

Daterangepicker calendar plug-in parameter attention, daterangepicker calendar

Display time, hour, minute, and second:


TimePicker is set to true, // The pickerTime written for some data is not very appropriate.


Key pitfall: Modify the default display format and write the fomat in locale. Many online documents are directly written in the daterangepicker attribute, which does not take effect.

The Start Time and end time can be set to a specific year, month, or day. You can also generate the current Date (new Date () or moment (). [moment () method is the moment. js function to obtain the current time ])

$ ("# Dateid "). daterangepicker ({startDate: moment (), // '2017-01-01 ', maxDate: new Date (), endDate: moment (), // new Date (), dateLimit: {days: 30}, // maximum interval between start and end times timePicker: true, // whether to display the hour and minute timePickerIncrement: 1, // time increment, in the unit of minute timePicker24Hour: true, // whether to use the 24-hour display time locale: {// used to set the default time display format. The Chinese display format of each button space is 'yyyy/MM/dd hh: mm: ss', applyLabel: 'confirmed', cancelLabel: 'cancel', fromLabel: 'From ', toLabel:' To ', weekLabel: 'w', customRangeLabel: 'select time', daysOfWeek: ["day", "one", "two", "three", "four", "five", "Six"], monthNames: ", "August 2015", "August", "August"],} range: {// set the shortcut interval control. different time periods: "Recent": ['2017-04-12 ', new Date ()] }}, function (start, end, label) {alert ('a date range was chosen: '+ start. format ('yyyy-MM-DD ') + 'to' + end. format ('yyyy-MM-DD '));}


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: 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.