Socket
Socket
Sign inDemoInstall

antd-cron-editor-asp

Package Overview
Dependencies
116
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    antd-cron-editor-asp

A cron expression generator to be used in React applications


Version published
Maintainers
1
Install size
76.9 MB
Created

Readme

Source

cron-editor

image-20190107170123819

usage

  • npm install antd-cron-editor
  • quick start
import React from 'react';
import CronEditor from 'antd-cron-editor';

const Test = () => {
  const handleChange = (cronText) => {
    console.log(cronText);
  };

  return <CronEditor onChange={handleChange} />;
};

export default Test;

  • with input area
import React from 'react';
import { Input } from 'asp-antd-compatible';
import CronEditor from 'antd-cron-editor';

class Test extends React.Component {
  state = {
    value: '0-2 32,2 * * * ?',
    inputText: '0-2 32,2 * * * ?',
  };

  handleChange = (cronText) => {
    console.log(cronText);
    this.setState({ value: cronText, inputText: cronText });
  };

  handleInputChange = ({ target: { value: inputText } }) => {
    this.setState({ inputText });
  };

  handlePressEnter = ({ target: { value: inputText } }) => {
    this.setState({ value: inputText, inputText });
  };

  render() {

    const { value, inputText } = this.state;

    return (
      <div>
        <Input onChange={this.handleInputChange} onPressEnter={this.handlePressEnter} value={inputText} />
        <CronEditor onChange={this.handleChange} span={2} value={value} />
      </div>
    );
  };
}

export default Test;

Keywords

FAQs

Last updated on 12 Nov 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc