import React from "react"; import styles from "./index.less"; import { Calendar, Select, Radio, Col, Row } from "antd"; import { CalendarMode } from "antd/es/calendar/generateCalendar"; const { Group, Button } = Radio; function onPanelChange(value: any, mode: CalendarMode) { console.log(value, mode); } export default () => (
{ const start = 0; const end = 12; const monthOptions = []; const current = value.clone(); const localeData = value.localeData(); const months = []; for (let i = 0; i < 12; i++) { current.month(i); months.push(localeData.monthsShort(current)); } for (let index = start; index < end; index++) { monthOptions.push( {months[index]} ); } const month = value.month(); const year = value.year(); const options = []; for (let i = year - 10; i < year + 10; i += 1) { options.push( {i} ); } return (
Custom header
onTypeChange(e.target.value)} value={type} >
); }} onPanelChange={onPanelChange} />
);