# react-cron-antd

> react cron antd

Latest version **1.1.2** (published 2021-08-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-cron-antd
pnpm add react-cron-antd
yarn add react-cron-antd
bun add react-cron-antd
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2021-08-10 |
| First published | 2019-09-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 121.9 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 35 |
| Author | zhengxiangqi |
| Maintainers | zhengxiangqi |
| Keywords | react, cron, antd |

## Links

- npm: https://www.npmjs.com/package/react-cron-antd
- Repository: https://github.com/zhengxiangqi/react-cron-antd
- Homepage: https://github.com/zhengxiangqi/react-cron-antd#readme
- Issues: https://github.com/zhengxiangqi/react-cron-antd/issues
- npm.io page: https://npm.io/package/react-cron-antd

## Dependencies (4)

- [antd](https://npm.io/package/antd.md) 4.9.2
- [react](https://npm.io/package/react.md) 17.0.1
- [react-dom](https://npm.io/package/react-dom.md) 17.0.1
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) 7.12.5

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.1.2 (latest) — 2021-08-10
- 1.1.1 — 2021-01-13
- 1.1.0 — 2021-01-13
- 1.0.0 — 2019-09-19

## README

<div align="center">
    <h1>ReactCron</h1>
    <div>基于React及Antd的cron时间表达式生成器</div>
    <br/>
    <img width=613 src="./snapshot.png" alt="效果图" />
</div>


### 特性
- 🎉 全面支持cron：秒、分、时、日、月、周、年
- 🎉 日及周条件互斥，自动改变响应值
- 🎉 支持反解析cron表达式到UI
- 🎉 可结合此组件与Antd的下拉及输入组件封装成下拉输入框


### 安装
```bash
npm install react-cron-antd
# 或
yarn add react-cron-antd
```


### 使用
```jsx
import React from 'react';
import Cron from 'react-cron-antd';

function Page() {
    return <Cron value="* * * * * ? *" onOk={(value) => console.log('cron:', value)} />;
}

export default Page;
```


### 扩展
封装一个用于表单组件的CronInput。

```jsx
import React from 'react';
import { Dropdown, Input } from 'antd';
import Cron from 'react-cron-antd';

function CronInput(props) {
    const { value, onChange } = props;

    return (
        <Dropdown
            trigger={['click']}
            placement="bottomLeft"
            overlay={<Cron value={value} onOk={onChange} />}
        >
            <Input.Search value={value} />
        </Dropdown>
    );
}

export default CronInput;
```


### 更新日志
- [点击查看更新日志](./CHANGELOG.md)


### LICENSE
MIT

---
_Source: https://npm.io/package/react-cron-antd · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
