Skip to content

Instantly share code, notes, and snippets.

@dangrossman
Last active January 11, 2023 12:47
Show Gist options
  • Save dangrossman/e118af4dbadc5177d7494dba9d3295d1 to your computer and use it in GitHub Desktop.
Save dangrossman/e118af4dbadc5177d7494dba9d3295d1 to your computer and use it in GitHub Desktop.
<input type="text" name="daterange" value="01/01/2018 - 01/15/2018" />
<script>
$(function() {
$('input[name="daterange"]').daterangepicker({
opens: 'left'
}, function(start, end, label) {
console.log("A new date selection was made: " + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD'));
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment