Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bootstrap-daterangepicker

Package Overview
Dependencies
Maintainers
3
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bootstrap-daterangepicker

Date range picker component for Bootstrap

  • 2.1.24
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
102K
decreased by-15.19%
Maintainers
3
Weekly downloads
 
Created

What is bootstrap-daterangepicker?

The bootstrap-daterangepicker npm package is a date range picker component for Bootstrap. It allows users to select a date range from a calendar view, which can be used in forms, reports, and other applications where date range selection is required.

What are bootstrap-daterangepicker's main functionalities?

Basic Date Range Picker

This feature allows you to add a basic date range picker to an input field. When the input field is clicked, a calendar view appears, allowing the user to select a start and end date.

import 'bootstrap/dist/css/bootstrap.css';
import 'bootstrap-daterangepicker/daterangepicker.css';
import $ from 'jquery';
import 'bootstrap-daterangepicker';

$(function() {
  $('input[name="daterange"]').daterangepicker();
});

Predefined Date Ranges

This feature allows you to define predefined date ranges that users can quickly select. This is useful for common date ranges like 'Last 7 Days' or 'This Month'.

import 'bootstrap/dist/css/bootstrap.css';
import 'bootstrap-daterangepicker/daterangepicker.css';
import $ from 'jquery';
import 'bootstrap-daterangepicker';

$(function() {
  $('input[name="daterange"]').daterangepicker({
    ranges: {
      'Today': [moment(), moment()],
      'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
      'Last 7 Days': [moment().subtract(6, 'days'), moment()],
      'Last 30 Days': [moment().subtract(29, 'days'), moment()],
      'This Month': [moment().startOf('month'), moment().endOf('month')],
      'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
    }
  });
});

Single Date Picker

This feature allows you to configure the date range picker to select a single date instead of a range. This is useful for forms where only a single date is needed.

import 'bootstrap/dist/css/bootstrap.css';
import 'bootstrap-daterangepicker/daterangepicker.css';
import $ from 'jquery';
import 'bootstrap-daterangepicker';

$(function() {
  $('input[name="singleDate"]').daterangepicker({
    singleDatePicker: true,
    showDropdowns: true
  });
});

Other packages similar to bootstrap-daterangepicker

FAQs

Package last updated on 15 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc