CronInput
Edits a 5-field cron expression and previews its human meaning live as the user types.
Installation
pnpm dlx shadcn@latest add @shadmin/cron-inputUsage
import { CronInput } from '@/components/admin';
<CronInput source="schedule" />
<CronInput source="schedule" disabled />Props
| Prop | Required | Type | Default | Description |
|---|---|---|---|---|
source | Required | string | - | Form field name |
label | Optional | string | false | Inferred | Custom label |
helperText | Optional | ReactNode | - | Helper text |
disabled | Optional | boolean | false | Disable input |
defaultValue | Optional | string | - | Initial cron expression |
validate | Optional | Validator | Validator[] | - | Validation |
className | Optional | string | - | CSS class on wrapper |
Dependency
cronstrue (~10KB). Standard 5-field cron only.