import DatePicker2 from '..';
import React from 'react';
import ReactDOM from 'react-dom';
import dayjs from 'dayjs';
const { RangePicker } = DatePicker2;
const onChange = (date, dateStr) => console.log(date, dateStr);
const onPanelChange = (value, mode) => console.log(value.format('YYYY-MM-DD'), mode);
function App() {
    return (React.createElement("div", { className: "app" },
        React.createElement("div", null,
            React.createElement(DatePicker2
            // @ts-ignore
            , { 
                // @ts-ignore
                defaultPanelValue: dayjs('2020-11'), onPanelChange: onPanelChange, onChange: onChange })),
        React.createElement("div", null,
            React.createElement(DatePicker2, { showTime: true, 
                // @ts-ignore
                defaultPanelValue: dayjs('2020-11'), onPanelChange: onPanelChange, onChange: onChange })),
        React.createElement("div", null,
            React.createElement(DatePicker2, { mode: "month", 
                // @ts-ignore
                defaultPanelValue: dayjs('2020-11'), onPanelChange: onPanelChange, onChange: onChange })),
        React.createElement("div", null,
            React.createElement(DatePicker2, { mode: "year", 
                // @ts-ignore
                defaultPanelValue: dayjs('2030'), onPanelChange: onPanelChange, onChange: onChange })),
        React.createElement("div", null,
            React.createElement(RangePicker
            // @ts-ignore
            , { 
                // @ts-ignore
                defaultPanelValue: dayjs('2020-11'), onPanelChange: onPanelChange, onChange: onChange }))));
}
ReactDOM.render(React.createElement(App, null), document.getElementById('date-picker2-demo-8'));
