test/dummy/vendor/assets/components/moment/src/lib/create/check-overflow.js in date_picker-0.0.8 vs test/dummy/vendor/assets/components/moment/src/lib/create/check-overflow.js in date_picker-0.0.9

- old
+ new

@@ -1,7 +1,7 @@ import { daysInMonth } from '../units/month'; -import { YEAR, MONTH, DATE, HOUR, MINUTE, SECOND, MILLISECOND } from '../units/constants'; +import { YEAR, MONTH, DATE, HOUR, MINUTE, SECOND, MILLISECOND, WEEK, WEEKDAY } from '../units/constants'; import getParsingFlags from '../create/parsing-flags'; export default function checkOverflow (m) { var overflow; var a = m._a; @@ -16,9 +16,15 @@ a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1; if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { overflow = DATE; + } + if (getParsingFlags(m)._overflowWeeks && overflow === -1) { + overflow = WEEK; + } + if (getParsingFlags(m)._overflowWeekday && overflow === -1) { + overflow = WEEKDAY; } getParsingFlags(m).overflow = overflow; }