import DatePicker from '..';
import React from 'react';
import ReactDOM from 'react-dom';
import moment from 'moment';
const { RangePicker, MonthPicker } = DatePicker;
function onVisibleMonthChange(val, reason) {
    console.log(val.format('L'), reason);
}
ReactDOM.render(React.createElement("div", null,
    React.createElement("p", null, "Setting last month as default visible month"),
    React.createElement(DatePicker, { defaultVisibleMonth: () => moment().add(-1, 'months'), 
        // @ts-ignore
        onVisibleMonthChange: onVisibleMonthChange }),
    React.createElement("br", null),
    React.createElement("br", null),
    React.createElement(RangePicker, { defaultVisibleMonth: () => moment().add(-1, 'months'), 
        // @ts-ignore
        onVisibleMonthChange: onVisibleMonthChange }),
    React.createElement("br", null),
    React.createElement("br", null),
    React.createElement("p", null, "Setting 2019 as default visible year"),
    React.createElement(MonthPicker, { defaultVisibleYear: () => moment('2019', 'YYYY') })), document.getElementById('date-picker-demo-6'));
