diff --git a/package.json b/package.json index d9a03a6..766316a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "datetimerangepicker", - "version": "2.0.8", + "version": "2.0.9", "description": "Date-time-range picker based on Quasar Framework", "productName": "DateTimeRangePicker", "cordovaId": "org.cordova.quasar.app", diff --git a/src/components/DateRangePicker.vue b/src/components/DateRangePicker.vue index d8e8fd7..3573b85 100644 --- a/src/components/DateRangePicker.vue +++ b/src/components/DateRangePicker.vue @@ -88,7 +88,6 @@ export default { dateRangeConfig: { mode: 'single', inline: true, - maxDate: (new Date()).setHours(23, 59, 59, 999), locale: { firstDayOfWeek: 1 } @@ -122,7 +121,6 @@ export default { this.dateRangeMode = mode let config = { inline: true, - maxDate: (new Date()).setHours(23, 59, 59, 999), locale: this.dateRangeConfig.locale, plugins: [ new ScrollPlugin() ] } @@ -159,7 +157,6 @@ export default { } else if (mode === DATE_RANGE_MODE_WEEK) { let getCurr = () => new Date(range[0].valueOf()) let curr = getCurr() - let newDate = new Date() let currentDay = curr.getDay() if (this.dateRangeConfig.locale && this.dateRangeConfig.locale.firstDayOfWeek) { let firstDayOfWeek = this.dateRangeConfig.locale.firstDayOfWeek @@ -171,21 +168,14 @@ export default { firstday.setHours(0, 0, 0, 0) let lastday = new Date(getCurr().setDate(last)) lastday.setHours(23, 59, 59, 999) - if (lastday > newDate) { - lastday = newDate - } range = [firstday, lastday] } else if (mode === DATE_RANGE_MODE_MONTH) { - let newDate = new Date() let date = new Date(range[0].valueOf() + 86400000), y = date.getUTCFullYear(), m = date.getUTCMonth() let firstday = new Date(y, m, 1) firstday.setHours(0, 0, 0, 0) let lastday = new Date(y, m + 1, 1) lastday.setHours(0, 0, 0, 0) lastday = new Date(lastday - 1) - if (lastday > newDate) { - lastday = newDate - } range = [firstday, lastday] } else if (mode === DATE_RANGE_MODE_CURRENT) { let begin = this.currentBeginTime @@ -197,10 +187,6 @@ export default { last.setHours(end.getHours(), end.getMinutes(), end.getSeconds()) range = [first, last] } - let now = new Date() - if (range[1] > now) { - range[1] = now - } return range }, currentDateRangeModelChangeHandler (range) {