/* eslint-disable max-len */ import React, { useState, useMemo } from 'react'; import { DatePicker, Icon, Typography, Space, Tabs, TabPane } from '../../../index'; import './index.scss'; const { Text } = Typography; export default function Demo() { const [activeTab, setActiveTab] = useState('1'); const [date, setDate] = useState(); const uedDisabledDate = currentDate => currentDate && currentDate.getDate() > 10 && currentDate.getDate() < 15; const testDisabledDate = currentDate => currentDate && currentDate.getDate() > 15 && currentDate.getDate() < 25; const handleTabChange = tab => { setActiveTab(tab); setDate(); }; const handleDateChange = value => { setDate(value); }; const disabledDate = useMemo(() => (activeTab === '1' ? uedDisabledDate : testDisabledDate), [activeTab]); const TopSlot = function (props) { const { style } = props; return ( ); }; const BottomSlot = function (props) { const { style } = props; return ( 定版前请阅读 发版须知 ); }; const MonthBottomSlot = function (props) { const { style } = props; return ( 请阅读 须知 ); }; return (
topSlot } disabledDate={disabledDate} value={date} onChange={handleDateChange} />

bottomSlot } />

bottomSlot+dateTimeRange } style={{ width: 300 }} />

topSlot+month } />

topSlot+bottomSlot+compact } bottomSlot={} density="compact" />
); }