diff --git a/src/Datetime.vue b/src/Datetime.vue index e2abd67..e24080e 100644 --- a/src/Datetime.vue +++ b/src/Datetime.vue @@ -146,10 +146,10 @@ export default { return this.datetime ? this.datetime.setZone(this.zone) : this.newPopupDatetime() }, popupMinDatetime () { - return this.minDatetime ? DateTime.fromISO(this.minDatetime) : null + return this.minDatetime ? DateTime.fromISO(this.minDatetime).setZone(this.zone) : null }, popupMaxDatetime () { - return this.maxDatetime ? DateTime.fromISO(this.maxDatetime) : null + return this.maxDatetime ? DateTime.fromISO(this.maxDatetime).setZone(this.zone) : null } }, diff --git a/src/DatetimeCalendar.vue b/src/DatetimeCalendar.vue index 0707d07..d6c0d9c 100644 --- a/src/DatetimeCalendar.vue +++ b/src/DatetimeCalendar.vue @@ -59,7 +59,7 @@ export default { data () { return { - newDate: DateTime.fromObject({ year: this.year, month: this.month, timeZone: 'UTC' }), + newDate: DateTime.fromObject({ year: this.year, month: this.month, zone: 'utc' }), weekdays: weekdays(this.weekStart), months: months() } diff --git a/src/util.js b/src/util.js index 0cb03a4..fecb85f 100644 --- a/src/util.js +++ b/src/util.js @@ -31,7 +31,7 @@ export function monthDays (year, month, weekStart) { } export function monthDayIsDisabled (minDate, maxDate, year, month, day) { - const date = DateTime.fromObject({ year, month, day }) + const date = DateTime.fromObject({ year, month, day, zone: 'utc' }) minDate = minDate ? startOfDay(minDate) : null maxDate = maxDate ? startOfDay(maxDate) : null