haavardj / ngx-cron-editor

Graphically build CRON expressions in Angular 15+
https://github.com/haavardj/ngx-cron-editor
MIT License
44 stars 101 forks source link

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

Closed MartinMilata closed 1 week ago

MartinMilata commented 6 months ago

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">

haavardj commented 1 week ago

Should be (partially) fixed in release 0.10.1