bootstrap-daterangepicker
Advanced tools
Comparing version 2.1.30 to 3.0.0
{ | ||
"name": "bootstrap-daterangepicker", | ||
"name": "daterangepicker", | ||
"main": [ | ||
@@ -4,0 +4,0 @@ "daterangepicker.js", |
Package.describe({ | ||
name: 'dangrossman:bootstrap-daterangepicker', | ||
version: '2.1.30', | ||
summary: 'Date range picker component for Bootstrap', | ||
git: 'https://github.com/dangrossman/bootstrap-daterangepicker', | ||
version: '3.0.0', | ||
summary: 'Date range picker component', | ||
git: 'https://github.com/dangrossman/daterangepicker', | ||
documentation: 'README.md' | ||
@@ -12,5 +12,4 @@ }); | ||
api.use('twbs:bootstrap@3.3.4', ["client"], {weak: true}); | ||
api.use('momentjs:moment@2.10.3', ["client"]); | ||
api.use('jquery@1.11.3_2', ["client"]); | ||
api.use('momentjs:moment@2.22.1', ["client"]); | ||
api.use('jquery@3.3.1', ["client"]); | ||
@@ -17,0 +16,0 @@ api.addFiles('daterangepicker.js', ["client"]); |
{ | ||
"name": "bootstrap-daterangepicker", | ||
"version": "2.1.30", | ||
"version": "3.0.0", | ||
"description": "Date range picker component for Bootstrap", | ||
@@ -13,3 +13,3 @@ "main": "daterangepicker.js", | ||
"type": "git", | ||
"url": "https://github.com/dangrossman/bootstrap-daterangepicker.git" | ||
"url": "https://github.com/dangrossman/daterangepicker.git" | ||
}, | ||
@@ -23,5 +23,5 @@ "author": { | ||
"bugs": { | ||
"url": "https://github.com/dangrossman/bootstrap-daterangepicker/issues" | ||
"url": "https://github.com/dangrossman/daterangepicker/issues" | ||
}, | ||
"homepage": "https://github.com/dangrossman/bootstrap-daterangepicker", | ||
"homepage": "https://github.com/dangrossman/daterangepicker", | ||
"dependencies": { | ||
@@ -28,0 +28,0 @@ "jquery": ">=1.10", |
@@ -26,3 +26,3 @@ # Date Range Picker for Bootstrap | ||
Copyright (c) 2012-2017 Dan Grossman | ||
Copyright (c) 2012-2018 Dan Grossman | ||
@@ -29,0 +29,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy |
@@ -25,3 +25,3 @@ $(document).ready(function() { | ||
updateConfig(); | ||
//updateConfig(); | ||
@@ -37,2 +37,8 @@ function updateConfig() { | ||
if ($('#minYear').val().length && $('#minYear').val() != 1) | ||
options.minYear = parseInt($('#minYear').val(), 10); | ||
if ($('#maxYear').val().length && $('#maxYear').val() != 1) | ||
options.maxYear = parseInt($('#maxYear').val(), 10); | ||
if ($('#showWeekNumbers').is(':checked')) | ||
@@ -59,4 +65,4 @@ options.showWeekNumbers = true; | ||
if ($('#dateLimit').is(':checked')) | ||
options.dateLimit = { days: 7 }; | ||
if ($('#maxSpan').is(':checked')) | ||
options.maxSpan = { days: 7 }; | ||
@@ -126,25 +132,52 @@ if ($('#ranges').is(':checked')) { | ||
if ($('#applyClass').val().length && $('#applyClass').val() != 'btn-success') | ||
options.applyClass = $('#applyClass').val(); | ||
if ($('#applyButtonClasses').val().length && $('#applyButtonClasses').val() != 'btn-primary') | ||
options.applyButtonClasses = $('#applyButtonClasses').val(); | ||
if ($('#cancelClass').val().length && $('#cancelClass').val() != 'btn-default') | ||
options.cancelClass = $('#cancelClass').val(); | ||
if ($('#cancelButtonClasses').val().length && $('#cancelButtonClasses').val() != 'btn-default') | ||
options.cancelClass = $('#cancelButtonClasses').val(); | ||
$('#config-text').val("$('#demo').daterangepicker(" + JSON.stringify(options, null, ' ') + ", function(start, end, label) {\n console.log('New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')');\n});"); | ||
$('#config-demo').daterangepicker(options, function(start, end, label) { console.log('New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')'); }); | ||
if (typeof options.ranges !== 'undefined') { | ||
options.ranges = {}; | ||
} | ||
var option_text = JSON.stringify(options, null, ' '); | ||
var replacement = "ranges: {\n" | ||
+ " 'Today': [moment(), moment()],\n" | ||
+ " 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],\n" | ||
+ " 'Last 7 Days': [moment().subtract(6, 'days'), moment()],\n" | ||
+ " 'Last 30 Days': [moment().subtract(29, 'days'), moment()],\n" | ||
+ " 'This Month': [moment().startOf('month'), moment().endOf('month')],\n" | ||
+ " 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]\n" | ||
+ " }"; | ||
option_text = option_text.replace(new RegExp('"ranges"\: \{\}', 'g'), replacement); | ||
$('#config-text').val("$('#demo').daterangepicker(" + option_text + ", function(start, end, label) {\n console.log('New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')');\n});"); | ||
} | ||
if ($(window).width() > 980) { | ||
$('#sidebar').affix({ | ||
offset: { | ||
top: 300, | ||
bottom: function () { | ||
return (this.bottom = $('.footer').outerHeight(true)) | ||
} | ||
} | ||
}); | ||
} | ||
$('body').scrollspy({ target: '#nav-spy', offset: 20 }); | ||
$(window).scroll(function (event) { | ||
var scroll = $(window).scrollTop(); | ||
if (scroll > 180) { | ||
$('.leftcol').css('position', 'fixed'); | ||
$('.leftcol').css('top', '10px'); | ||
} else { | ||
$('.leftcol').css('position', 'absolute'); | ||
$('.leftcol').css('top', '180px'); | ||
} | ||
}); | ||
var bg = new Trianglify({ | ||
x_colors: ["#e1f3fd", "#eeeeee", "#407dbf"], | ||
y_colors: 'match_x', | ||
width: document.body.clientWidth, | ||
height: 150, | ||
stroke_width: 0, | ||
cell_size: 20 | ||
}); | ||
$('#jumbo').css('background-image', 'url(' + bg.png() + ')'); | ||
}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
646338
24
5919