xrutayisire / react-js-cron

A React cron editor built with antd
https://xrutayisire.github.io/react-js-cron/?path=/docs/reactjs-cron--demo
MIT License
247 stars 106 forks source link

Unconventional cron not throwing error but changes cron value to closest accepted value #31

Closed jianminggit closed 2 years ago

jianminggit commented 2 years ago

Describe the bug Unconventional cron pasted in a text field does not throw an error but forcibly changing the select dropdown to its closest accepted value.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'https://xrutayisire.github.io/react-js-cron/?path=/docs/reactjs-cron--track-error'
  2. Type Sun#3 in the text input
  3. Select input resets the cron value to the closest accepted value
  4. No error shown

Expected behavior An error should be thrown

xrutayisire commented 2 years ago

Thanks for the issue, good catch :)

I will try to find time during the weekend to fix this bug.

xrutayisire commented 2 years ago

v2.1.2 is released with the fix! 🎉

It will throw an error now if any value is not correct! You can reopen this issue if you still found some Cron that should throw an error but don't 🙂

Have a good day!