Skip to content

Commit

Permalink
CM-197: Adding init range parameter to datepicker
Browse files Browse the repository at this point in the history
  • Loading branch information
JRMaitre authored and joristirado committed Jan 4, 2016
1 parent 73ad2c1 commit 58a79ab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/lib/monster.ui.js
Original file line number Diff line number Diff line change
@@ -678,6 +678,7 @@ define(function(require){
var self = this,
container = options.container,
range = options.range || 7,
initRange = options.initRange || options.range || 1,
inputStartDate = container.find('#startDate'),
inputEndDate = container.find('#endDate'),
now = new Date(),
@@ -689,7 +690,7 @@ define(function(require){
startDate.setMonth(startDate.getMonth() - 1);
}
else {
startDate.setDate(startDate.getDate() - range);
startDate.setDate(startDate.getDate() - initRange);
}
startDate.setDate(startDate.getDate() + 1);

0 comments on commit 58a79ab

Please sign in to comment.