search

Home  >  Q&A  >  body text

javascript - What time plug-ins can be used with react?

What time plug-ins can be used in react and how to use them

扔个三星炸死你扔个三星炸死你2731 days ago635

reply all(1)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-06-26 10:59:55

    Just use antd, which can be introduced as needed.
    The following is the official basic code

    import { DatePicker } from 'antd';
    const { MonthPicker, RangePicker } = DatePicker;
    
    function onChange(date, dateString) {
      console.log(date, dateString);
    }
    
    ReactDOM.render(
      <p>
        <DatePicker onChange={onChange} />
        <br />
        <MonthPicker onChange={onChange} placeholder="Select month" />
        <br />
        <RangePicker onChange={onChange} />
      </p>
    , mountNode);

    reply
    0
  • Cancelreply