Skip to content
This repository has been archived by the owner on Sep 21, 2024. It is now read-only.

Instantiate with default values while reopening cron editor #33

Open
Harshall opened this issue Sep 16, 2020 · 0 comments
Open

Instantiate with default values while reopening cron editor #33

Harshall opened this issue Sep 16, 2020 · 0 comments

Comments

@Harshall
Copy link

Harshall commented Sep 16, 2020

Using cron options to initialize, once reopened for second time cron editor is retaining the old selections.

How to reinitialize the default values available in cronOptions.

public cronOptions: CronOptions = {
    formInputClass: 'form-control cron-editor-input',
    formSelectClass: 'form-control cron-editor-select',
    formRadioClass: 'cron-editor-radio',
    formCheckboxClass: 'cron-editor-checkbox',

    defaultTime: '10:00:00',
    use24HourTime: true,

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

    hideSeconds: false,
    removeSeconds: false,
    removeYears: false
  };

<cron-editor [(cron)]="cronExpression" [disabled]="isCronDisabled" [(options)]="cronOptions"></cron-editor>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant