Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ngx-cron-editor

haavardj10.4kMIT0.10.1TypeScript support: included

A cron expression generator for Angular 15+

angular, cron, cron-expression, angular-cli, quartz

readme

ngx-cron-editor

An Angular 15+ component for building cron expressions graphically. It is meant to be used in reactive forms and support Angular Material Design styling.

Demo

A demo can be found here

Usage

  1. Install the npm package:

     $ npm i ngx-cron-editor -S
  2. Import the module in your own module:

     import { CronEditorModule } from 'ngx-cron-editor';
    
     @NgModule({
         imports: [..., CronEditorModule],
     ...
     })
     export class MyModule {
     }
  3. Setup the FormControl in you component's typescript file:

    ngOnInit(): void {
      this.cronForm = new FormControl('0 0 1/1 * *');
    }
  4. Include the component in your html code:

     <cron-editor [formControl]="cronForm"></cron-editor>

    or use the formControlName='...' directive if your form controller lives in a FormGroup.

Options

<cron-editor [formControl]="cronForm" [options]="cronOptions"></cron-editor>
import { CronOptions } from 'ngx-cron-editor';

@Component({
    ...
})
export class MyComponent {
   public cronOptions: CronOptions = {
       defaultTime: "00:00:00",

       hideMinutesTab: false,
       hideHourlyTab: false,
       hideDailyTab: false,
       hideWeeklyTab: false,
       hideMonthlyTab: false,
       hideYearlyTab: false,
       hideAdvancedTab: true,
       hideSpecificWeekDayTab: false,
       hideSpecificMonthWeekTab : false,

       use24HourTime: true,
       hideSeconds: false,

       cronFlavor: "quartz" //standard or quartz
    };
}

History

The ngx-cron-editor is a fork of the vincentjames501's angular-cron-gen for AngularJS 1.5+ and claudiuconstantin's [cron-editor(https://github.com/claudiuconstantin/cron-editor)].

The main additions of this fork is support for Angular 8+ and material design.

License:

Licensed under the MIT license

changelog

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

0.10.1 (2024-10-25)

Features

  • demo: add input expression that does not update with editor (1469ad7)
  • editor: parse MON-FRI day ranges (140c217), closes #35

Bug Fixes

  • missing checks for uninitialized class properties (0626119)

0.10.0 (2024-10-03)

⚠ BREAKING CHANGES

  • Drop support for styling through CronOptions and Material 2

Features

Bug Fixes

  • synchronize input and editor values (e3302db), closes #42

0.9.0 (2024-10-02)

Features

  • build with Angular 18 (1b8f4ac)
  • move to ESLint for linting (c58f978)
  • updates for Material 2 as suggested by the ng update tool (c66adcf)

0.8.4 (2024-10-01)

0.8.3 (2024-09-23)

0.8.2 (2024-04-17)

Bug Fixes

  • monthly localization is missing (#33) (e159b61)
  • parsing of monthly and yearly input expressions (#34) (b09e77a)

0.8.1 (2024-02-05)

0.8.0 (2024-02-04)

⚠ BREAKING CHANGES

  • The library will no longer support Angular versions < 15.

  • remove support for old Angular versions (6e377bc)

0.7.11 (2023-12-24)

Features

Bug Fixes

0.7.10 (2023-12-11)

Bug Fixes

  • Invalid expression when no weekday selected (40700a9), closes #26

0.7.9 (2023-08-16)

Bug Fixes

0.7.9-0 (2023-08-14)

Bug Fixes

0.7.8 (2023-07-04)

Bug Fixes

0.7.7 (2023-07-03)

0.7.6 (2023-01-30)

Bug Fixes

  • wrong default values when tabs are hidden (#11) (96e32bb), closes #12

0.7.5 (2022-12-26)

0.7.4 (2022-07-07)

0.7.2 (2021-11-07)

0.7.1 (2021-11-07)

0.7.0 (2021-09-07)

Features

Bug Fixes

0.6.8 (2021-01-09)

0.6.7 (2021-01-09)

0.6.6 (2021-01-08)

0.6.5 (2021-01-08)

Features

  • support Angular Material version 11 (PR #4) (65aaf83)

0.6.4 (2020-02-27)

Bug Fixes

  • cron options hiding not working working (#3) (52edbe6)

0.6.3 (2019-12-29)

Bug Fixes

0.6.2 (2019-12-28)

Bug Fixes

  • add support for formControl directives (887c9bc)

0.6.1 (2019-12-27)

Bug Fixes

  • app complains about BrowserModule import (97772e8)

0.6.0 (2019-12-26)

⚠ BREAKING CHANGES

  • Component now use Angular's reactive forms and material design styling. Support for template based forms is removed.

Features

  • Update for Angular 8 and Material design (81c5bcb)

0.5.1 (2019-12-15)

Bug Fixes

  • improve project layout and build environment for Angular 8 (1974262)
  • update GitHub Pages demo (4a161ae)

0.5.0 (2019-12-15)

0.4.0 (2018-07-22)

Features

  • update bootstrap and angular dependencies (73d3b40)

0.3.1 (2018-06-06)

0.3.0 (2018-06-05)

Bug Fixes

  • add missing event parameter to setActiveTab (5f9deb1)

Features

  • update ownership and name, and upgrade ng-packagr (b04c5af)