Skip to content

Commit

Permalink
fix: fix console warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
MikitaLisavets committed Nov 9, 2020
1 parent 7d170e6 commit d1be33a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/components/src/datepicker/private/InputsPanel.tsx
Expand Up @@ -61,10 +61,10 @@ export const InputsPanel: React.FC<InputsPanelProps> = ({
? "yyyy-MM-dd'T'HH:mm"
: 'yyyy-MM-dd';
const [inputStartDate, setInputStartDate] = React.useState(
startDate ? format(startDate, dateFormat) : undefined
startDate ? format(startDate, dateFormat) : ''
);
const [inputEndDate, setInputEndDate] = React.useState(
endDate ? format(endDate, dateFormat) : undefined
endDate ? format(endDate, dateFormat) : ''
);
const [hasStartDateError, setStartDateError] = React.useState('');
const [hasEndDateError, setEndDateError] = React.useState(false);
Expand Down
7 changes: 4 additions & 3 deletions packages/components/src/datepicker/private/Month.tsx
Expand Up @@ -94,12 +94,13 @@ export const Month: React.FC<MonthProps> = ({
{monthLabel}&nbsp;&nbsp;{year}
</MonthYearLabel>
<Days>
{weekDayLabels.map(dayLabel => (
<DayName key={dayLabel}>{dayLabel}</DayName>
{weekDayLabels.map((dayLabel, weekIndex) => (
// eslint-disable-next-line react/no-array-index-key
<DayName key={`${dayLabel}-${weekIndex}`}>{dayLabel}</DayName>
))}
{monthDays.map(day => (
<Day
key={day.date}
key={day.getTime()}
onDayClick={onDayClick}
onMouseEnter={onMouseEnter}
date={day}
Expand Down

0 comments on commit d1be33a

Please sign in to comment.