Registry / web-framework / cron-expression-input

cron-expression-input

JSON →
library1.3.1jsnpmunverified

A Vue.js UI component that provides an intuitive editor for generating and validating cron expressions. v1.3.1 is current; updates are infrequent. Supports standard 5-field cron syntax with dropdowns and free-text input. Differentiator: built-in validation with human-readable feedback, localization support, and no external runtime dependencies beyond Vue 3.

npm install cron-expression-input
INSTALL
IMPORT
SIG · CRON-EXPRESSION-IN
C
cron-expression-input
web-frameworkjavascriptv1.3.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CronExpressionInput
✓ import CronExpressionInput from 'cron-expression-input'
✗ const CronExpressionInput = require('cron-expression-input')
ESM default export. CommonJS require may not work in all environments.
default (Vue plugin)
✓ import CronExpressionInput from 'cron-expression-input'; app.use(CronExpressionInput)
✗ import { CronExpressionInput } from 'cron-expression-input'
Named import is incorrect; component is default export. Use app.use() to register globally.
type definitions
✓ import CronExpressionInput from 'cron-expression-input'
✗ import type CronExpressionInput from 'cron-expression-input'
TypeScript types are bundled; no separate type import needed.

Shows basic usage of the CronExpressionInput component with binding to a cron expression string and change event.

<template> <div id="app"> <cron-expression-input :disabled="false" @change="onChange" expression="0 0 * * *" language="en" /> </div> </template> <script> import { defineComponent, ref } from 'vue' import CronExpressionInput from 'cron-expression-input' export default defineComponent({ name: 'App', components: { CronExpressionInput }, setup() { const expression = ref('0 0 * * *') const onChange = (newVal) => { expression.value = newVal console.log('Expression:', newVal) } return { expression, onChange } } }) </script>
Debug
Known issues
gotchaThe component only supports standard 5-field cron (minute, hour, day of month, month, day of week). 6-field (with seconds) or 7-field (with year) are not supported.
fix
Use a different library if you need seconds or year support.
affects: >=1.0
gotchaThe `expression` prop must be a valid cron string. Passing an invalid string will throw a validation error inside the component.
fix
Ensure the initial expression prop is a valid cron pattern.
affects: >=1.0
deprecatedComponent previously accepted `v-model` directly; now requires `expression` prop and `@change` event for two-way binding.
fix
Use `:expression="val" @change="val = $event"` instead.
affects: >=1.2
breakingVersion 1.3 removed support for Vue 2. Only Vue 3 is supported.
fix
Upgrade to Vue 3 or stick with version 1.2.x for Vue 2.
affects: >=1.3
Errors
Common errors & fixes
Cannot find module 'cron-expression-input'
Package not installed or not found in node_modules.
fix
Run `npm install cron-expression-input` or `yarn add cron-expression-input`.
Failed to mount component: template or render function not defined
Importing component incorrectly (e.g., named import instead of default).
fix
Use `import CronExpressionInput from 'cron-expression-input'` instead of `import { CronExpressionInput } from 'cron-expression-input'`.
TypeError: Cannot read property 'expression' of undefined
Attempting to use v-model on component in version 1.2+ without proper props/events.
fix
Use `expression` prop and `@change` event instead of v-model.
Upgrade
Version history
1.3.1latest on npm
Audit
Dependencies
vuerequiredpeer dependency - component requires Vue 3
Agent activity
8 hits · last 30 days
node
8
Resources
cron-expression-input — npm install cron-expression-input · libregistry