Date Range Picker

Originally created for reports at Improvely, the Date Range Picker can be attached to any webpage element to pop up two calendars for selecting dates, times, or predefined ranges like "Last 30 Days".

For full documentation please check the plugin's site
Basic
<script>
    $(function() {
        $('input[name="dates"]').daterangepicker({ startDate: moment(), endDate: moment().add(2, 'day')});
    })
</script>
Date Range Picker With Times
<script>
$(function() {
    $('input[name="datetimes"]').daterangepicker({
        timePicker: true,
        startDate: moment().startOf('hour'),
        endDate: moment().startOf('hour').add(32, 'hour'),
        locale: {
            format: 'M/DD hh:mm A'
            }
        });
    });
</script>
Single Date Picker
<script>
    $(function() {
    $('input[name="birthday"]').daterangepicker({
        singleDatePicker: true,
        showDropdowns: true,
        minYear: 1901,
        maxYear: parseInt(moment().format('YYYY'),10)
        }, function(start, end, label) {
            var years = moment().diff(start, 'years');
            alert("You are " + years + " years old!");
        });
    });
</script>
Predefined Date Ranges
<script>
    $(function() {
        var start = moment().subtract(29, 'days');
        var end = moment();
        function cb(start, end) {
            $('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
        }
        $('#reportrange').daterangepicker({
            startDate: start,
            endDate: end,
            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')]
            }
        }, cb);
        cb(start, end);
    });
</script>

Theme Settings

Theme presets

Custom color


Font family

Font size

Quick Chat

DG

Design Team

Alex is typing…
avatar-1 avatar-2
+5
avatar-3
Good morning!
The new deployment went live. Can everyone confirm access?
09:12
avatar-4
Yes, logging in now.
09:14 ✔✔
avatar-5
I can access it. Some pages feel faster than before.
09:15
avatar-2
Great! Please check billing and analytics modules as well.
09:16
avatar-4
Billing looks fine. I'll test analytics next.
09:17

Notifications

avatar-7

Mark Collins commented on Design System v3

12 mins ago • UI Guild
“Can we try a slightly softer shadow on the cards for light mode?”
avatar-8

Emily Carter added you to Sprint Planning

45 mins ago • Product
Planning High priority Sprint Q2
avatar-9

Liam Brown requested access to Revenue Dashboard

3 hours ago • Analytics
avatar-10

Sara Lee shared a file with you

5 hours ago • 1.4 MB
PDF
Q3_report.pdf
Updated 20 mins ago
avatar-12

Design Team assigned you to Marketing Site Refresh

Yesterday • Design Board
New task
avatar-11

Support Bot replied to your ticket #4821

9 mins ago • Billing
“We've updated your invoice and applied the requested discount.”
avatar-8

Changelog posted Release 1.8.0

2 days ago • Updates
New automation rules, improved search results, and performance fixes.