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 '));}