Skip to content

Instantly share code, notes, and snippets.

@sendgrid-gists
Last active August 15, 2017 22:30
SendGrid style-guide predefined picker
<div class="input-text-wrap is-calendar has-value">
<label class="input-text-label" for="input-date-range-predefined">Dates</label>
<input id="input-date-range-predefined" type="text" value="11/29/2016">
</div>
$("#input-date-range-predefined").daterangepicker({
ranges: {
"Last 7 Days": [moment().subtract(6, "days"), moment()],
"Last 30 Days": [moment().subtract(29, "days"), moment()],
"Last 90 Days": [moment().subtract(89, "days"), moment()]
},
showCustomRangeLabel: false,
alwaysShowCalendars: true
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment