"use strict";

require("./demo2.css");

var _ = _interopRequireDefault(require(".."));

var _react = _interopRequireDefault(require("react"));

var _reactDom = _interopRequireDefault(require("react-dom"));

var _moment = _interopRequireDefault(require("moment"));

var _solarlunar = _interopRequireDefault(require("solarlunar"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

function onDateChange(value) {
  console.log(value.format('L'));
}

function dateCellRender(value) {
  var solar2lunarData = _solarlunar["default"].solar2lunar(value.year(), value.month(), value.date());

  return /*#__PURE__*/_react["default"].createElement("div", {
    className: "custom-cell"
  }, value.date(), /*#__PURE__*/_react["default"].createElement("span", null, solar2lunarData.lDay === 1 ? solar2lunarData.monthCn : solar2lunarData.dayCn));
}

_reactDom["default"].render( /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_["default"], {
  onSelect: onDateChange,
  dateCellRender: dateCellRender,
  defaultValue: (0, _moment["default"])().add(1, 'days')
})), document.getElementById('calendar-demo-2'));