1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | import classNames from "classnames";
|
17 | import * as React from "react";
|
18 | import { Button } from "@blueprintjs/core";
|
19 | import * as Classes from "./common/classes";
|
20 | import { areSameMonth } from "./common/dateUtils";
|
21 | export class DatePickerNavbar extends React.PureComponent {
|
22 | render() {
|
23 | const { classNames: classes, month, maxDate, minDate } = this.props;
|
24 | return (React.createElement("div", { className: classNames(Classes.DATEPICKER_NAVBAR, classes.navBar) },
|
25 | this.props.hideLeftNavButton || (React.createElement(Button, { "aria-label": "Go to previous month", className: classes.navButtonPrev, disabled: areSameMonth(month, minDate), icon: "chevron-left", minimal: true, onClick: this.handlePreviousClick })),
|
26 | this.props.hideRightNavButton || (React.createElement(Button, { "aria-label": "Go to next month", className: classes.navButtonNext, disabled: areSameMonth(month, maxDate), icon: "chevron-right", minimal: true, onClick: this.handleNextClick }))));
|
27 | }
|
28 | handleNextClick = () => this.props.onNextClick();
|
29 | handlePreviousClick = () => this.props.onPreviousClick();
|
30 | }
|
31 |
|
\ | No newline at end of file |