Bootstrap time plug-in daterangepicker analysis
This article mainly introduces the use of bootstrap time plug-in daterangepicker in detail. It has certain reference value. Interested friends can refer to it. I hope it can help everyone.
Plug-in download address: https://github.com/dangrossman/bootstrap-daterangepicker
Header introduction file:
<link href=”http://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css” rel=”stylesheet”> <link rel=”stylesheet” type=”text/css” media=”all” href=”daterangepicker.css” /> <script type=”text/javascript” src=”http://lib.sinaapp.com/js/jquery/1.9.1/jquery-1.9.1.min.js“></script> <script type=”text/javascript” src=”http://cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js“></script> <script type=”text/javascript” src=”moment.js“></script> <script type=”text/javascript” src=”daterangepicker.js“></script>
Related configuration:
$('#startDate').daterangepicker({ //绑定input元素 id="startDate" "startDate": "08/07/2015 - 08/17/2015", //默认选择开始时间 "endDate": "08/17/2015", //默认选择结束时间 //singleDatePicker: true, //显示单个日历表 //"timePicker": true, //开启时、分 //"showWeekNumbers": true, //显示第几周 //"timePicker24Hour": true, //开启24小时制 startDate: moment().subtract(10, 'days'), //两个时间相隔时间 "showDropdowns": true, //开启年月的选择 ranges : { //快捷选择时间 '最近1小时': [moment().subtract('hours',1), moment()], '今日': [moment(), moment()], '昨日': [moment().subtract('days', 1).startOf('day'), moment().subtract('days', 1).endOf('day')], '最近7日': [moment().subtract('days', 6), moment()], '最近30日': [moment().subtract('days', 29), moment()] }, locale : { //中文汉化 applyLabel : '确定', cancelLabel : '取消', fromLabel : '起始时间', toLabel : '结束时间', customRangeLabel : '自定义', daysOfWeek : ['日','一','二','三','四','五','六'], monthNames : [ '一月', '二月', '三月', '四月', '五月', '六月','七月', '八月', '九月', '十月', '十一月', '十二月' ], firstDay : 1 }, // "opens": "left", //日历表的位置 // "drops": "up", //日历表的位置 // "buttonClasses": "button", //日历表"确定"按钮类名 // "applyClass": "hover", //日历表"确定"按钮类名 // "cancelClass": "cancel" //日历表"取消"按钮类名 });
Related recommendations:
js time plug-in_html/css_WEB-ITnose
How to use the combination of JS replacement and time plug-in_javascript skills
Input box selection time plug-in usage example implemented by jQuery_jquery
The above is the detailed content of Bootstrap time plug-in daterangepicker analysis. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



How to use Bootstrap to get the value of the search bar: Determines the ID or name of the search bar. Use JavaScript to get DOM elements. Gets the value of the element. Perform the required actions.

Using Bootstrap in Vue.js is divided into five steps: Install Bootstrap. Import Bootstrap in main.js. Use the Bootstrap component directly in the template. Optional: Custom style. Optional: Use plug-ins.

There are two ways to create a Bootstrap split line: using the tag, which creates a horizontal split line. Use the CSS border property to create custom style split lines.

Use Bootstrap to implement vertical centering: flexbox method: Use the d-flex, justify-content-center, and align-items-center classes to place elements in the flexbox container. align-items-center class method: For browsers that do not support flexbox, use the align-items-center class, provided that the parent element has a defined height.

How to use the Bootstrap button? Introduce Bootstrap CSS to create button elements and add Bootstrap button class to add button text

To adjust the size of elements in Bootstrap, you can use the dimension class, which includes: adjusting width: .col-, .w-, .mw-adjust height: .h-, .min-h-, .max-h-

To set up the Bootstrap framework, you need to follow these steps: 1. Reference the Bootstrap file via CDN; 2. Download and host the file on your own server; 3. Include the Bootstrap file in HTML; 4. Compile Sass/Less as needed; 5. Import a custom file (optional). Once setup is complete, you can use Bootstrap's grid systems, components, and styles to create responsive websites and applications.

There are several ways to insert images in Bootstrap: insert images directly, using the HTML img tag. With the Bootstrap image component, you can provide responsive images and more styles. Set the image size, use the img-fluid class to make the image adaptable. Set the border, using the img-bordered class. Set the rounded corners and use the img-rounded class. Set the shadow, use the shadow class. Resize and position the image, using CSS style. Using the background image, use the background-image CSS property.
