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
Live demo and usage at https://xrutayisire.github.io/react-js-cron/
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