Issue with duration in smart Date

By admin_wla | Wed, 19 May 2021 - 16:20

In forms with smart-date field types there is an issue that the duration field can't be set and gives the issue "This value should be of the correct primitive type.".

The reason is, that the default duration is not set to an integer but to an empty string. Setting the value to 0 cures the problem.

The fix has to be applied in line 230 of web/modules/contrib/smart_date/src/Plugin/Field/FieldWidget/SmartDateWidgetBase.php in setting $default_duration = 0;

19.5.2021 wla