Skip to content

Commit 6567538

Browse files
jontrainormartijnrusschen
authored andcommitted
issue-1204 replaced the datepicker navigation links with buttons (Hacker0x01#1206)
1 parent 07f2e38 commit 6567538

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/calendar.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ export default class Calendar extends React.Component {
272272
return;
273273
}
274274
return (
275-
<a
275+
<button
276276
className="react-datepicker__navigation react-datepicker__navigation--previous"
277277
onClick={this.decreaseMonth}/>
278278
);
@@ -297,7 +297,7 @@ export default class Calendar extends React.Component {
297297
classes.push("react-datepicker__navigation--next--with-today-button");
298298
}
299299

300-
return <a className={classes.join(" ")} onClick={this.increaseMonth} />;
300+
return <button className={classes.join(" ")} onClick={this.increaseMonth} />;
301301
};
302302

303303
renderCurrentMonth = (date = this.state.date) => {

src/stylesheets/datepicker.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,14 @@
9090
}
9191

9292
.react-datepicker__navigation {
93+
background: none;
9394
line-height: $datepicker__item-size;
9495
text-align: center;
9596
cursor: pointer;
9697
position: absolute;
9798
top: 10px;
9899
width: 0;
100+
padding: 0;
99101
border: $datepicker__navigation-size solid transparent;
100102
z-index: 1;
101103

0 commit comments

Comments
 (0)