Code Monkey home page Code Monkey logo

react-cron-builder's Introduction

React Cron Builder

React component to build cron expression

installation

npm install --save react-cron-builder

demo

Live demo

usage

import CronBuilder from  'react-cron-builder
import 'react-cron-builder/dist/bundle.css'

<CronBuilder 
    cronExpression="*/4 2,12,22 * * 1-5"
    onChange={::console.log}
    showResult={false}
/>

component was inspired by this util

react-cron-builder's People

Contributors

nsecchi-carecloud avatar one-more avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

react-cron-builder's Issues

Cannot read property 'value' of null

When I click on clear button in select, I have next error:

Uncaught TypeError: Cannot read property 'value' of null
    at exports.getValue (preview.26a577d48087577ef808.bundle.js:3652)
    at Object.onChange (preview.26a577d48087577ef808.bundle.js:14520)
    at Object.setValue (preview.26a577d48087577ef808.bundle.js:13103)
    at Object.clearValue (preview.26a577d48087577ef808.bundle.js:13103)
    at Object.invokeGuardedCallback (preview.26a577d48087577ef808.bundle.js:5646)
    at executeDispatch (preview.26a577d48087577ef808.bundle.js:5646)
    at Object.executeDispatchesInOrder (preview.26a577d48087577ef808.bundle.js:5646)
    at executeDispatchesAndRelease (preview.26a577d48087577ef808.bundle.js:1763)
    at executeDispatchesAndReleaseTopLevel (preview.26a577d48087577ef808.bundle.js:1763)
    at Array.forEach (<anonymous>)

Can't Contribute due to babel & webpack updates

Hey there

I really like this package, and was keen to submit a PR for #5 but I can't run any of this locally. I've been battling errors to do with babel and webpack. The versions were not pinned in package.json, and used "*" instead, so after running npm install all the packages were upgraded to the latest version which caused many breaking changes.

I've battled these issues for a few hours now, would you be able to pin the correct versions so I could work on this package? Thanks!

Invalid Expressions

I can't use all of these expressions. I use your library in react to generate cron expression, save it to my db and when i want to start job in my java code i have an error that Cron Expression is invalid. Maybe someone could explain what is the problem?! Thanks.

Show result not working after set default value

It's a suggestion.

First of all, This is an awesome package.
I have one suggestion and also I have issue.

Suggestion,

If user set default value. then user can show result.
For Example :- If user use 'cronExpression' at edit time like using state at that time result not showing after I set showResult={true}.

Issue,

Some drop-down not proper bind if I set default value. for Example

I used cronExpression: "*/6 9-21 1 * *"
2nd

1st

I am fresher in react.js. Please correct me if I am wrong.

Thank you

October is missing

October is missing from the month dropdown. All months are offset by 1.

const monthOptions = [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'November', 'December' ].map((month: string, i: number) => ({ label: month, value: String(i + 1) }));

TypeError: Cannot read property 'oneOfType' of undefined

On Runkit, I ran the following code (here: https://npm.runkit.com/react-cron-builder):

require("react-dom")
require("react/package.json"); // react is a peer dependency.

require("lodash/package.json"); // lodash is a peer dependency.
var reactCronBuilder = require("react-cron-builder")

After running it, I encounter the error in the title, pointing to the file react-cron-builder/dist/bundle.js (line 11)
This also happened on my local code, without any other message.

Inconsistency in the buttons in the section periodically

In the section periodically when you change between minutes and hours the values of every and on are also changed, this only happens when previously you had already changed between every and on.

Is there a way that these values do not change?

onChange event on every change

It's not an issue. It's a suggestion.

First of all, great work man. This is an awesome package.

I just wanted to know wouldn't it be better if the onChange event calls on every change we do in the form. Right now it just calls only when the generate button is clicked.

Can this be implemented?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.