Skip to content

Angular Cron Expression Editor does not work properly for "daily tab" Week Day (MON-FRI) radio option #35

@MartinMilata

Description

@MartinMilata

1.Go to daily tab
2.Click Week Day (MON-FRI) radio option
3.Set for example at time: 1H, 5min, 3sec - expression will be changed to Expression: 3 5 1 ? * MON-FRI *
4.This expression I saved to db - 3 5 1 ? * MON-FRI *
5.ngOnInit I get this expression data from db, and set reactive forms like this:

this.form = this.fb.group({
cronExpression: [this.item.cronExpression]
});

  1. There are not set radio option Week Day (MON-FRI) , there are set first radio option..All other inputs are set correctly..
  2. This problem IS NOT in monthly or yearly tab, where we also have two radio options.. In those tabs monthly, yearly - there are those seconds radion options set correctly... When I click to update button - I mean <mat-button-toggle i18n (click)="form.patchValue({expression: form.value.expression})">Update the Week Day (MON-FRI) radio option is set correctly...

My code:
ts:
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

};

html
<cron-editor formControlName="cronExpression" [options]="cronOptions">

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions