JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 45072
  • Score
    100M100P100Q151264F
  • License MIT

A React cron editor with antd inspired by jqcron

Package Exports

  • react-js-cron

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-js-cron) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ReactJS Cron

A React cron editor with antd inspired by jqcron

npm package

Live demo and usage at https://xrutayisire.github.io/react-js-cron/

react-js-cron example

Install

Be sure that you have these dependencies on your project:

  • antd
  • react
  • react-dom
# Yarn
yarn add react-js-cron

# NPM
npm install --save react-js-cron

Usage

Learn more at https://xrutayisire.github.io/react-js-cron/

API

CronProps {
  value: string
  setValue: 
    | (value: string) => void
    | Dispatch<SetStateAction<string>> 
  className?: string
  clearButton?: boolean // Default: true
  defaultPeriod?: 'year' | 'month' | 'week' | 'day' | 'hour' | 'minute' // Default: 'month'
  clearButtonProps?: ButtonProps // Extends antd button props without onClick
  displayError?: boolean // Default: true
  setError?: 
    | (error: {
      type: 'invalid_cron'
      description: string
    }) => void
    | Dispatch<SetStateAction<{
      type: 'invalid_cron'
      description: string
    }>>
    | undefined
  allowEmpty?: 'always' | 'never' | 'for-default-value' // Default: 'for-default-value'
  humanizeLabels?: boolean // Default: false
  locale?: {
    everyText?: string
    emptyHours?: string
    emptyWeekDays?: string
    emptyMonthDays?: string
    emptyMonths?: string
    emptyMinutes?: string
    emptyMinutesWhenHoursPeriod?: string
    minuteOption?: string
    hourOption?: string
    dayOption?: string
    weekOption?: string
    monthOption?: string
    yearOption?: string
    prefixPeriod?: string
    prefixHours?: string
    prefixWeekDays?: string
    prefixMonthDays?: string
    prefixMonths?: string
    prefixMinutes?: string
    prefixMinutesWhenHoursPeriod?: string
    suffixMinutesWhenHoursPeriod?: string
    errorInvalidCron?: string
    weekDays?: string[]
    months?: string[]
  }  // Default: See file 'src/locale.ts'
}

License

MIT © xrutayisire