Closed Nathan-Limbik closed 2 years ago
Hi, when using less than the default number of headers, an error occurs when setting an initial Cron value:
Error Value does not match any available headers.
import React from "react"; import Cron from "react-cron-generator"; import "react-cron-generator/dist/cron-builder.css"; import { HEADER } from "react-cron-generator"; export default function App() { const [val, setVal] = React.useState("0 0 00 ? * TUE,THU,SAT *"); const options = { headers: [HEADER.DAILY, HEADER.WEEKLY, HEADER.MONTHLY] }; return ( <div> <Cron onChange={setVal} value={val} showResultText={true} showResultCron={true} options={options} /> </div> ); }
Thanks @Nathan-Limbik I have found the issue I will try to fix the issue today itself
The issue is fixed in the latest cron generator version Version: 1.3.6
Hi, when using less than the default number of headers, an error occurs when setting an initial Cron value:
Error Value does not match any available headers.