|
|
@@ -155,8 +155,8 @@ View.mixin({
|
|
|
unit = computeGreatestUnit(range.start, range.end);
|
|
|
}
|
|
|
else {
|
|
|
- unit = 'day';
|
|
|
- duration = moment.duration({ days: 1 });
|
|
|
+ duration = this.getFallbackDuration();
|
|
|
+ unit = computeGreatestUnit(duration);
|
|
|
range = this.buildRangeFromDuration(date, direction, duration, unit);
|
|
|
}
|
|
|
|
|
|
@@ -166,6 +166,11 @@ View.mixin({
|
|
|
},
|
|
|
|
|
|
|
|
|
+ getFallbackDuration: function() {
|
|
|
+ return moment.duration({ days: 1 });
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
// If the range has day units or larger, remove times. Otherwise, ensure times.
|
|
|
normalizeRange: function(range, unit) {
|
|
|
|