Edit File by line
/home/barbar84/www/wp-inclu.../js/dist
File: components.js
key: 'onDayClick',
[45000] Fix | Delete
value: function () {
[45001] Fix | Delete
function onDayClick(day, e) {
[45002] Fix | Delete
if (e) e.preventDefault();
[45003] Fix | Delete
if (this.isBlocked(day)) return;
[45004] Fix | Delete
var _props2 = this.props,
[45005] Fix | Delete
onDateChange = _props2.onDateChange,
[45006] Fix | Delete
keepOpenOnDateSelect = _props2.keepOpenOnDateSelect,
[45007] Fix | Delete
onFocusChange = _props2.onFocusChange,
[45008] Fix | Delete
onClose = _props2.onClose;
[45009] Fix | Delete
[45010] Fix | Delete
[45011] Fix | Delete
onDateChange(day);
[45012] Fix | Delete
if (!keepOpenOnDateSelect) {
[45013] Fix | Delete
onFocusChange({ focused: false });
[45014] Fix | Delete
onClose({ date: day });
[45015] Fix | Delete
}
[45016] Fix | Delete
}
[45017] Fix | Delete
[45018] Fix | Delete
return onDayClick;
[45019] Fix | Delete
}()
[45020] Fix | Delete
}, {
[45021] Fix | Delete
key: 'onDayMouseEnter',
[45022] Fix | Delete
value: function () {
[45023] Fix | Delete
function onDayMouseEnter(day) {
[45024] Fix | Delete
if (this.isTouchDevice) return;
[45025] Fix | Delete
var _state = this.state,
[45026] Fix | Delete
hoverDate = _state.hoverDate,
[45027] Fix | Delete
visibleDays = _state.visibleDays;
[45028] Fix | Delete
[45029] Fix | Delete
[45030] Fix | Delete
var modifiers = this.deleteModifier({}, hoverDate, 'hovered');
[45031] Fix | Delete
modifiers = this.addModifier(modifiers, day, 'hovered');
[45032] Fix | Delete
[45033] Fix | Delete
this.setState({
[45034] Fix | Delete
hoverDate: day,
[45035] Fix | Delete
visibleDays: (0, _object2['default'])({}, visibleDays, modifiers)
[45036] Fix | Delete
});
[45037] Fix | Delete
}
[45038] Fix | Delete
[45039] Fix | Delete
return onDayMouseEnter;
[45040] Fix | Delete
}()
[45041] Fix | Delete
}, {
[45042] Fix | Delete
key: 'onDayMouseLeave',
[45043] Fix | Delete
value: function () {
[45044] Fix | Delete
function onDayMouseLeave() {
[45045] Fix | Delete
var _state2 = this.state,
[45046] Fix | Delete
hoverDate = _state2.hoverDate,
[45047] Fix | Delete
visibleDays = _state2.visibleDays;
[45048] Fix | Delete
[45049] Fix | Delete
if (this.isTouchDevice || !hoverDate) return;
[45050] Fix | Delete
[45051] Fix | Delete
var modifiers = this.deleteModifier({}, hoverDate, 'hovered');
[45052] Fix | Delete
[45053] Fix | Delete
this.setState({
[45054] Fix | Delete
hoverDate: null,
[45055] Fix | Delete
visibleDays: (0, _object2['default'])({}, visibleDays, modifiers)
[45056] Fix | Delete
});
[45057] Fix | Delete
}
[45058] Fix | Delete
[45059] Fix | Delete
return onDayMouseLeave;
[45060] Fix | Delete
}()
[45061] Fix | Delete
}, {
[45062] Fix | Delete
key: 'onPrevMonthClick',
[45063] Fix | Delete
value: function () {
[45064] Fix | Delete
function onPrevMonthClick() {
[45065] Fix | Delete
var _props3 = this.props,
[45066] Fix | Delete
onPrevMonthClick = _props3.onPrevMonthClick,
[45067] Fix | Delete
numberOfMonths = _props3.numberOfMonths,
[45068] Fix | Delete
enableOutsideDays = _props3.enableOutsideDays;
[45069] Fix | Delete
var _state3 = this.state,
[45070] Fix | Delete
currentMonth = _state3.currentMonth,
[45071] Fix | Delete
visibleDays = _state3.visibleDays;
[45072] Fix | Delete
[45073] Fix | Delete
[45074] Fix | Delete
var newVisibleDays = {};
[45075] Fix | Delete
Object.keys(visibleDays).sort().slice(0, numberOfMonths + 1).forEach(function (month) {
[45076] Fix | Delete
newVisibleDays[month] = visibleDays[month];
[45077] Fix | Delete
});
[45078] Fix | Delete
[45079] Fix | Delete
var prevMonth = currentMonth.clone().subtract(1, 'month');
[45080] Fix | Delete
var prevMonthVisibleDays = (0, _getVisibleDays2['default'])(prevMonth, 1, enableOutsideDays);
[45081] Fix | Delete
[45082] Fix | Delete
this.setState({
[45083] Fix | Delete
currentMonth: prevMonth,
[45084] Fix | Delete
visibleDays: (0, _object2['default'])({}, newVisibleDays, this.getModifiers(prevMonthVisibleDays))
[45085] Fix | Delete
}, function () {
[45086] Fix | Delete
onPrevMonthClick(prevMonth.clone());
[45087] Fix | Delete
});
[45088] Fix | Delete
}
[45089] Fix | Delete
[45090] Fix | Delete
return onPrevMonthClick;
[45091] Fix | Delete
}()
[45092] Fix | Delete
}, {
[45093] Fix | Delete
key: 'onNextMonthClick',
[45094] Fix | Delete
value: function () {
[45095] Fix | Delete
function onNextMonthClick() {
[45096] Fix | Delete
var _props4 = this.props,
[45097] Fix | Delete
onNextMonthClick = _props4.onNextMonthClick,
[45098] Fix | Delete
numberOfMonths = _props4.numberOfMonths,
[45099] Fix | Delete
enableOutsideDays = _props4.enableOutsideDays;
[45100] Fix | Delete
var _state4 = this.state,
[45101] Fix | Delete
currentMonth = _state4.currentMonth,
[45102] Fix | Delete
visibleDays = _state4.visibleDays;
[45103] Fix | Delete
[45104] Fix | Delete
[45105] Fix | Delete
var newVisibleDays = {};
[45106] Fix | Delete
Object.keys(visibleDays).sort().slice(1).forEach(function (month) {
[45107] Fix | Delete
newVisibleDays[month] = visibleDays[month];
[45108] Fix | Delete
});
[45109] Fix | Delete
[45110] Fix | Delete
var nextMonth = currentMonth.clone().add(numberOfMonths, 'month');
[45111] Fix | Delete
var nextMonthVisibleDays = (0, _getVisibleDays2['default'])(nextMonth, 1, enableOutsideDays);
[45112] Fix | Delete
[45113] Fix | Delete
var newCurrentMonth = currentMonth.clone().add(1, 'month');
[45114] Fix | Delete
this.setState({
[45115] Fix | Delete
currentMonth: newCurrentMonth,
[45116] Fix | Delete
visibleDays: (0, _object2['default'])({}, newVisibleDays, this.getModifiers(nextMonthVisibleDays))
[45117] Fix | Delete
}, function () {
[45118] Fix | Delete
onNextMonthClick(newCurrentMonth.clone());
[45119] Fix | Delete
});
[45120] Fix | Delete
}
[45121] Fix | Delete
[45122] Fix | Delete
return onNextMonthClick;
[45123] Fix | Delete
}()
[45124] Fix | Delete
}, {
[45125] Fix | Delete
key: 'onMonthChange',
[45126] Fix | Delete
value: function () {
[45127] Fix | Delete
function onMonthChange(newMonth) {
[45128] Fix | Delete
var _props5 = this.props,
[45129] Fix | Delete
numberOfMonths = _props5.numberOfMonths,
[45130] Fix | Delete
enableOutsideDays = _props5.enableOutsideDays,
[45131] Fix | Delete
orientation = _props5.orientation;
[45132] Fix | Delete
[45133] Fix | Delete
var withoutTransitionMonths = orientation === _constants.VERTICAL_SCROLLABLE;
[45134] Fix | Delete
var newVisibleDays = (0, _getVisibleDays2['default'])(newMonth, numberOfMonths, enableOutsideDays, withoutTransitionMonths);
[45135] Fix | Delete
[45136] Fix | Delete
this.setState({
[45137] Fix | Delete
currentMonth: newMonth.clone(),
[45138] Fix | Delete
visibleDays: this.getModifiers(newVisibleDays)
[45139] Fix | Delete
});
[45140] Fix | Delete
}
[45141] Fix | Delete
[45142] Fix | Delete
return onMonthChange;
[45143] Fix | Delete
}()
[45144] Fix | Delete
}, {
[45145] Fix | Delete
key: 'onYearChange',
[45146] Fix | Delete
value: function () {
[45147] Fix | Delete
function onYearChange(newMonth) {
[45148] Fix | Delete
var _props6 = this.props,
[45149] Fix | Delete
numberOfMonths = _props6.numberOfMonths,
[45150] Fix | Delete
enableOutsideDays = _props6.enableOutsideDays,
[45151] Fix | Delete
orientation = _props6.orientation;
[45152] Fix | Delete
[45153] Fix | Delete
var withoutTransitionMonths = orientation === _constants.VERTICAL_SCROLLABLE;
[45154] Fix | Delete
var newVisibleDays = (0, _getVisibleDays2['default'])(newMonth, numberOfMonths, enableOutsideDays, withoutTransitionMonths);
[45155] Fix | Delete
[45156] Fix | Delete
this.setState({
[45157] Fix | Delete
currentMonth: newMonth.clone(),
[45158] Fix | Delete
visibleDays: this.getModifiers(newVisibleDays)
[45159] Fix | Delete
});
[45160] Fix | Delete
}
[45161] Fix | Delete
[45162] Fix | Delete
return onYearChange;
[45163] Fix | Delete
}()
[45164] Fix | Delete
}, {
[45165] Fix | Delete
key: 'getFirstFocusableDay',
[45166] Fix | Delete
value: function () {
[45167] Fix | Delete
function getFirstFocusableDay(newMonth) {
[45168] Fix | Delete
var _this3 = this;
[45169] Fix | Delete
[45170] Fix | Delete
var _props7 = this.props,
[45171] Fix | Delete
date = _props7.date,
[45172] Fix | Delete
numberOfMonths = _props7.numberOfMonths;
[45173] Fix | Delete
[45174] Fix | Delete
[45175] Fix | Delete
var focusedDate = newMonth.clone().startOf('month');
[45176] Fix | Delete
if (date) {
[45177] Fix | Delete
focusedDate = date.clone();
[45178] Fix | Delete
}
[45179] Fix | Delete
[45180] Fix | Delete
if (this.isBlocked(focusedDate)) {
[45181] Fix | Delete
var days = [];
[45182] Fix | Delete
var lastVisibleDay = newMonth.clone().add(numberOfMonths - 1, 'months').endOf('month');
[45183] Fix | Delete
var currentDay = focusedDate.clone();
[45184] Fix | Delete
while (!(0, _isAfterDay2['default'])(currentDay, lastVisibleDay)) {
[45185] Fix | Delete
currentDay = currentDay.clone().add(1, 'day');
[45186] Fix | Delete
days.push(currentDay);
[45187] Fix | Delete
}
[45188] Fix | Delete
[45189] Fix | Delete
var viableDays = days.filter(function (day) {
[45190] Fix | Delete
return !_this3.isBlocked(day) && (0, _isAfterDay2['default'])(day, focusedDate);
[45191] Fix | Delete
});
[45192] Fix | Delete
if (viableDays.length > 0) {
[45193] Fix | Delete
var _viableDays = _slicedToArray(viableDays, 1);
[45194] Fix | Delete
[45195] Fix | Delete
focusedDate = _viableDays[0];
[45196] Fix | Delete
}
[45197] Fix | Delete
}
[45198] Fix | Delete
[45199] Fix | Delete
return focusedDate;
[45200] Fix | Delete
}
[45201] Fix | Delete
[45202] Fix | Delete
return getFirstFocusableDay;
[45203] Fix | Delete
}()
[45204] Fix | Delete
}, {
[45205] Fix | Delete
key: 'getModifiers',
[45206] Fix | Delete
value: function () {
[45207] Fix | Delete
function getModifiers(visibleDays) {
[45208] Fix | Delete
var _this4 = this;
[45209] Fix | Delete
[45210] Fix | Delete
var modifiers = {};
[45211] Fix | Delete
Object.keys(visibleDays).forEach(function (month) {
[45212] Fix | Delete
modifiers[month] = {};
[45213] Fix | Delete
visibleDays[month].forEach(function (day) {
[45214] Fix | Delete
modifiers[month][(0, _toISODateString2['default'])(day)] = _this4.getModifiersForDay(day);
[45215] Fix | Delete
});
[45216] Fix | Delete
});
[45217] Fix | Delete
[45218] Fix | Delete
return modifiers;
[45219] Fix | Delete
}
[45220] Fix | Delete
[45221] Fix | Delete
return getModifiers;
[45222] Fix | Delete
}()
[45223] Fix | Delete
}, {
[45224] Fix | Delete
key: 'getModifiersForDay',
[45225] Fix | Delete
value: function () {
[45226] Fix | Delete
function getModifiersForDay(day) {
[45227] Fix | Delete
var _this5 = this;
[45228] Fix | Delete
[45229] Fix | Delete
return new Set(Object.keys(this.modifiers).filter(function (modifier) {
[45230] Fix | Delete
return _this5.modifiers[modifier](day);
[45231] Fix | Delete
}));
[45232] Fix | Delete
}
[45233] Fix | Delete
[45234] Fix | Delete
return getModifiersForDay;
[45235] Fix | Delete
}()
[45236] Fix | Delete
}, {
[45237] Fix | Delete
key: 'getStateForNewMonth',
[45238] Fix | Delete
value: function () {
[45239] Fix | Delete
function getStateForNewMonth(nextProps) {
[45240] Fix | Delete
var _this6 = this;
[45241] Fix | Delete
[45242] Fix | Delete
var initialVisibleMonth = nextProps.initialVisibleMonth,
[45243] Fix | Delete
date = nextProps.date,
[45244] Fix | Delete
numberOfMonths = nextProps.numberOfMonths,
[45245] Fix | Delete
enableOutsideDays = nextProps.enableOutsideDays;
[45246] Fix | Delete
[45247] Fix | Delete
var initialVisibleMonthThunk = initialVisibleMonth || (date ? function () {
[45248] Fix | Delete
return date;
[45249] Fix | Delete
} : function () {
[45250] Fix | Delete
return _this6.today;
[45251] Fix | Delete
});
[45252] Fix | Delete
var currentMonth = initialVisibleMonthThunk();
[45253] Fix | Delete
var visibleDays = this.getModifiers((0, _getVisibleDays2['default'])(currentMonth, numberOfMonths, enableOutsideDays));
[45254] Fix | Delete
return { currentMonth: currentMonth, visibleDays: visibleDays };
[45255] Fix | Delete
}
[45256] Fix | Delete
[45257] Fix | Delete
return getStateForNewMonth;
[45258] Fix | Delete
}()
[45259] Fix | Delete
}, {
[45260] Fix | Delete
key: 'addModifier',
[45261] Fix | Delete
value: function () {
[45262] Fix | Delete
function addModifier(updatedDays, day, modifier) {
[45263] Fix | Delete
var _props8 = this.props,
[45264] Fix | Delete
numberOfVisibleMonths = _props8.numberOfMonths,
[45265] Fix | Delete
enableOutsideDays = _props8.enableOutsideDays,
[45266] Fix | Delete
orientation = _props8.orientation;
[45267] Fix | Delete
var _state5 = this.state,
[45268] Fix | Delete
firstVisibleMonth = _state5.currentMonth,
[45269] Fix | Delete
visibleDays = _state5.visibleDays;
[45270] Fix | Delete
[45271] Fix | Delete
[45272] Fix | Delete
var currentMonth = firstVisibleMonth;
[45273] Fix | Delete
var numberOfMonths = numberOfVisibleMonths;
[45274] Fix | Delete
if (orientation === _constants.VERTICAL_SCROLLABLE) {
[45275] Fix | Delete
numberOfMonths = Object.keys(visibleDays).length;
[45276] Fix | Delete
} else {
[45277] Fix | Delete
currentMonth = currentMonth.clone().subtract(1, 'month');
[45278] Fix | Delete
numberOfMonths += 2;
[45279] Fix | Delete
}
[45280] Fix | Delete
if (!day || !(0, _isDayVisible2['default'])(day, currentMonth, numberOfMonths, enableOutsideDays)) {
[45281] Fix | Delete
return updatedDays;
[45282] Fix | Delete
}
[45283] Fix | Delete
[45284] Fix | Delete
var iso = (0, _toISODateString2['default'])(day);
[45285] Fix | Delete
[45286] Fix | Delete
var updatedDaysAfterAddition = (0, _object2['default'])({}, updatedDays);
[45287] Fix | Delete
if (enableOutsideDays) {
[45288] Fix | Delete
var monthsToUpdate = Object.keys(visibleDays).filter(function (monthKey) {
[45289] Fix | Delete
return Object.keys(visibleDays[monthKey]).indexOf(iso) > -1;
[45290] Fix | Delete
});
[45291] Fix | Delete
[45292] Fix | Delete
updatedDaysAfterAddition = monthsToUpdate.reduce(function (days, monthIso) {
[45293] Fix | Delete
var month = updatedDays[monthIso] || visibleDays[monthIso];
[45294] Fix | Delete
var modifiers = new Set(month[iso]);
[45295] Fix | Delete
modifiers.add(modifier);
[45296] Fix | Delete
return (0, _object2['default'])({}, days, _defineProperty({}, monthIso, (0, _object2['default'])({}, month, _defineProperty({}, iso, modifiers))));
[45297] Fix | Delete
}, updatedDaysAfterAddition);
[45298] Fix | Delete
} else {
[45299] Fix | Delete
var monthIso = (0, _toISOMonthString2['default'])(day);
[45300] Fix | Delete
var month = updatedDays[monthIso] || visibleDays[monthIso];
[45301] Fix | Delete
[45302] Fix | Delete
var modifiers = new Set(month[iso]);
[45303] Fix | Delete
modifiers.add(modifier);
[45304] Fix | Delete
updatedDaysAfterAddition = (0, _object2['default'])({}, updatedDaysAfterAddition, _defineProperty({}, monthIso, (0, _object2['default'])({}, month, _defineProperty({}, iso, modifiers))));
[45305] Fix | Delete
}
[45306] Fix | Delete
[45307] Fix | Delete
return updatedDaysAfterAddition;
[45308] Fix | Delete
}
[45309] Fix | Delete
[45310] Fix | Delete
return addModifier;
[45311] Fix | Delete
}()
[45312] Fix | Delete
}, {
[45313] Fix | Delete
key: 'deleteModifier',
[45314] Fix | Delete
value: function () {
[45315] Fix | Delete
function deleteModifier(updatedDays, day, modifier) {
[45316] Fix | Delete
var _props9 = this.props,
[45317] Fix | Delete
numberOfVisibleMonths = _props9.numberOfMonths,
[45318] Fix | Delete
enableOutsideDays = _props9.enableOutsideDays,
[45319] Fix | Delete
orientation = _props9.orientation;
[45320] Fix | Delete
var _state6 = this.state,
[45321] Fix | Delete
firstVisibleMonth = _state6.currentMonth,
[45322] Fix | Delete
visibleDays = _state6.visibleDays;
[45323] Fix | Delete
[45324] Fix | Delete
[45325] Fix | Delete
var currentMonth = firstVisibleMonth;
[45326] Fix | Delete
var numberOfMonths = numberOfVisibleMonths;
[45327] Fix | Delete
if (orientation === _constants.VERTICAL_SCROLLABLE) {
[45328] Fix | Delete
numberOfMonths = Object.keys(visibleDays).length;
[45329] Fix | Delete
} else {
[45330] Fix | Delete
currentMonth = currentMonth.clone().subtract(1, 'month');
[45331] Fix | Delete
numberOfMonths += 2;
[45332] Fix | Delete
}
[45333] Fix | Delete
if (!day || !(0, _isDayVisible2['default'])(day, currentMonth, numberOfMonths, enableOutsideDays)) {
[45334] Fix | Delete
return updatedDays;
[45335] Fix | Delete
}
[45336] Fix | Delete
[45337] Fix | Delete
var iso = (0, _toISODateString2['default'])(day);
[45338] Fix | Delete
[45339] Fix | Delete
var updatedDaysAfterDeletion = (0, _object2['default'])({}, updatedDays);
[45340] Fix | Delete
if (enableOutsideDays) {
[45341] Fix | Delete
var monthsToUpdate = Object.keys(visibleDays).filter(function (monthKey) {
[45342] Fix | Delete
return Object.keys(visibleDays[monthKey]).indexOf(iso) > -1;
[45343] Fix | Delete
});
[45344] Fix | Delete
[45345] Fix | Delete
updatedDaysAfterDeletion = monthsToUpdate.reduce(function (days, monthIso) {
[45346] Fix | Delete
var month = updatedDays[monthIso] || visibleDays[monthIso];
[45347] Fix | Delete
var modifiers = new Set(month[iso]);
[45348] Fix | Delete
modifiers['delete'](modifier);
[45349] Fix | Delete
return (0, _object2['default'])({}, days, _defineProperty({}, monthIso, (0, _object2['default'])({}, month, _defineProperty({}, iso, modifiers))));
[45350] Fix | Delete
}, updatedDaysAfterDeletion);
[45351] Fix | Delete
} else {
[45352] Fix | Delete
var monthIso = (0, _toISOMonthString2['default'])(day);
[45353] Fix | Delete
var month = updatedDays[monthIso] || visibleDays[monthIso];
[45354] Fix | Delete
[45355] Fix | Delete
var modifiers = new Set(month[iso]);
[45356] Fix | Delete
modifiers['delete'](modifier);
[45357] Fix | Delete
updatedDaysAfterDeletion = (0, _object2['default'])({}, updatedDaysAfterDeletion, _defineProperty({}, monthIso, (0, _object2['default'])({}, month, _defineProperty({}, iso, modifiers))));
[45358] Fix | Delete
}
[45359] Fix | Delete
[45360] Fix | Delete
return updatedDaysAfterDeletion;
[45361] Fix | Delete
}
[45362] Fix | Delete
[45363] Fix | Delete
return deleteModifier;
[45364] Fix | Delete
}()
[45365] Fix | Delete
}, {
[45366] Fix | Delete
key: 'isBlocked',
[45367] Fix | Delete
value: function () {
[45368] Fix | Delete
function isBlocked(day) {
[45369] Fix | Delete
var _props10 = this.props,
[45370] Fix | Delete
isDayBlocked = _props10.isDayBlocked,
[45371] Fix | Delete
isOutsideRange = _props10.isOutsideRange;
[45372] Fix | Delete
[45373] Fix | Delete
return isDayBlocked(day) || isOutsideRange(day);
[45374] Fix | Delete
}
[45375] Fix | Delete
[45376] Fix | Delete
return isBlocked;
[45377] Fix | Delete
}()
[45378] Fix | Delete
}, {
[45379] Fix | Delete
key: 'isHovered',
[45380] Fix | Delete
value: function () {
[45381] Fix | Delete
function isHovered(day) {
[45382] Fix | Delete
var _ref = this.state || {},
[45383] Fix | Delete
hoverDate = _ref.hoverDate;
[45384] Fix | Delete
[45385] Fix | Delete
return (0, _isSameDay2['default'])(day, hoverDate);
[45386] Fix | Delete
}
[45387] Fix | Delete
[45388] Fix | Delete
return isHovered;
[45389] Fix | Delete
}()
[45390] Fix | Delete
}, {
[45391] Fix | Delete
key: 'isSelected',
[45392] Fix | Delete
value: function () {
[45393] Fix | Delete
function isSelected(day) {
[45394] Fix | Delete
var date = this.props.date;
[45395] Fix | Delete
[45396] Fix | Delete
return (0, _isSameDay2['default'])(day, date);
[45397] Fix | Delete
}
[45398] Fix | Delete
[45399] Fix | Delete
return isSelected;
[45400] Fix | Delete
}()
[45401] Fix | Delete
}, {
[45402] Fix | Delete
key: 'isToday',
[45403] Fix | Delete
value: function () {
[45404] Fix | Delete
function isToday(day) {
[45405] Fix | Delete
return (0, _isSameDay2['default'])(day, this.today);
[45406] Fix | Delete
}
[45407] Fix | Delete
[45408] Fix | Delete
return isToday;
[45409] Fix | Delete
}()
[45410] Fix | Delete
}, {
[45411] Fix | Delete
key: 'isFirstDayOfWeek',
[45412] Fix | Delete
value: function () {
[45413] Fix | Delete
function isFirstDayOfWeek(day) {
[45414] Fix | Delete
var firstDayOfWeek = this.props.firstDayOfWeek;
[45415] Fix | Delete
[45416] Fix | Delete
return day.day() === (firstDayOfWeek || _moment2['default'].localeData().firstDayOfWeek());
[45417] Fix | Delete
}
[45418] Fix | Delete
[45419] Fix | Delete
return isFirstDayOfWeek;
[45420] Fix | Delete
}()
[45421] Fix | Delete
}, {
[45422] Fix | Delete
key: 'isLastDayOfWeek',
[45423] Fix | Delete
value: function () {
[45424] Fix | Delete
function isLastDayOfWeek(day) {
[45425] Fix | Delete
var firstDayOfWeek = this.props.firstDayOfWeek;
[45426] Fix | Delete
[45427] Fix | Delete
return day.day() === ((firstDayOfWeek || _moment2['default'].localeData().firstDayOfWeek()) + 6) % 7;
[45428] Fix | Delete
}
[45429] Fix | Delete
[45430] Fix | Delete
return isLastDayOfWeek;
[45431] Fix | Delete
}()
[45432] Fix | Delete
}, {
[45433] Fix | Delete
key: 'render',
[45434] Fix | Delete
value: function () {
[45435] Fix | Delete
function render() {
[45436] Fix | Delete
var _props11 = this.props,
[45437] Fix | Delete
numberOfMonths = _props11.numberOfMonths,
[45438] Fix | Delete
orientation = _props11.orientation,
[45439] Fix | Delete
monthFormat = _props11.monthFormat,
[45440] Fix | Delete
renderMonthText = _props11.renderMonthText,
[45441] Fix | Delete
navPrev = _props11.navPrev,
[45442] Fix | Delete
navNext = _props11.navNext,
[45443] Fix | Delete
onOutsideClick = _props11.onOutsideClick,
[45444] Fix | Delete
withPortal = _props11.withPortal,
[45445] Fix | Delete
focused = _props11.focused,
[45446] Fix | Delete
enableOutsideDays = _props11.enableOutsideDays,
[45447] Fix | Delete
hideKeyboardShortcutsPanel = _props11.hideKeyboardShortcutsPanel,
[45448] Fix | Delete
daySize = _props11.daySize,
[45449] Fix | Delete
firstDayOfWeek = _props11.firstDayOfWeek,
[45450] Fix | Delete
renderCalendarDay = _props11.renderCalendarDay,
[45451] Fix | Delete
renderDayContents = _props11.renderDayContents,
[45452] Fix | Delete
renderCalendarInfo = _props11.renderCalendarInfo,
[45453] Fix | Delete
renderMonthElement = _props11.renderMonthElement,
[45454] Fix | Delete
calendarInfoPosition = _props11.calendarInfoPosition,
[45455] Fix | Delete
isFocused = _props11.isFocused,
[45456] Fix | Delete
isRTL = _props11.isRTL,
[45457] Fix | Delete
phrases = _props11.phrases,
[45458] Fix | Delete
dayAriaLabelFormat = _props11.dayAriaLabelFormat,
[45459] Fix | Delete
onBlur = _props11.onBlur,
[45460] Fix | Delete
showKeyboardShortcuts = _props11.showKeyboardShortcuts,
[45461] Fix | Delete
weekDayFormat = _props11.weekDayFormat,
[45462] Fix | Delete
verticalHeight = _props11.verticalHeight,
[45463] Fix | Delete
noBorder = _props11.noBorder,
[45464] Fix | Delete
transitionDuration = _props11.transitionDuration,
[45465] Fix | Delete
verticalBorderSpacing = _props11.verticalBorderSpacing,
[45466] Fix | Delete
horizontalMonthPadding = _props11.horizontalMonthPadding;
[45467] Fix | Delete
var _state7 = this.state,
[45468] Fix | Delete
currentMonth = _state7.currentMonth,
[45469] Fix | Delete
visibleDays = _state7.visibleDays;
[45470] Fix | Delete
[45471] Fix | Delete
[45472] Fix | Delete
return _react2['default'].createElement(_DayPicker2['default'], {
[45473] Fix | Delete
orientation: orientation,
[45474] Fix | Delete
enableOutsideDays: enableOutsideDays,
[45475] Fix | Delete
modifiers: visibleDays,
[45476] Fix | Delete
numberOfMonths: numberOfMonths,
[45477] Fix | Delete
onDayClick: this.onDayClick,
[45478] Fix | Delete
onDayMouseEnter: this.onDayMouseEnter,
[45479] Fix | Delete
onDayMouseLeave: this.onDayMouseLeave,
[45480] Fix | Delete
onPrevMonthClick: this.onPrevMonthClick,
[45481] Fix | Delete
onNextMonthClick: this.onNextMonthClick,
[45482] Fix | Delete
onMonthChange: this.onMonthChange,
[45483] Fix | Delete
onYearChange: this.onYearChange,
[45484] Fix | Delete
monthFormat: monthFormat,
[45485] Fix | Delete
withPortal: withPortal,
[45486] Fix | Delete
hidden: !focused,
[45487] Fix | Delete
hideKeyboardShortcutsPanel: hideKeyboardShortcutsPanel,
[45488] Fix | Delete
initialVisibleMonth: function () {
[45489] Fix | Delete
function initialVisibleMonth() {
[45490] Fix | Delete
return currentMonth;
[45491] Fix | Delete
}
[45492] Fix | Delete
[45493] Fix | Delete
return initialVisibleMonth;
[45494] Fix | Delete
}(),
[45495] Fix | Delete
firstDayOfWeek: firstDayOfWeek,
[45496] Fix | Delete
onOutsideClick: onOutsideClick,
[45497] Fix | Delete
navPrev: navPrev,
[45498] Fix | Delete
navNext: navNext,
[45499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function