Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

antd-cron-editor-asp

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

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

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10
increased by25%
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 12 Nov 2020

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc