elabx / FieldtypeRecurringDates

Recurring dates Inputfield for ProcessWire.
MIT License
10 stars 1 forks source link

Entering 0 in field "Every" leads to error - replace it with input type number #5

Open juergenweb opened 1 year ago

juergenweb commented 1 year ago

I have discovered some issues by adding certain values in the input fields. The first one ist the field "Every" - a text input. This field only allows values higher than 0, all other values will lead to an error.

Screenshot 2023-03-16 at 14-38-43 Bearbeite Seite Zuhause • webseite1 at

This will lead to the following error:

Screenshot 2023-03-16 at 14-41-26 InvalidArgumentException The INTERVAL rule part must be a positive integer ( 0)

Fortunatelly solving this issue is very simple - replace the field with a number field and set the min attribute to 1:

<input x-model.number="rrule.INTERVAL" min="1" :disabled="settings.limit_mode !== 'count'":name="count-options-${inputfield}" class="uk-input uk-width-1-1" type="number">

Works as expected!

Screenshot 2023-03-16 at 14-45-41 Bearbeite Seite Zuhause • webseite1 at

elabx commented 1 year ago

Thanks! Will upgrade this asap.