Fixed minimum for two number inputs (fixes 1083#)

This commit is contained in:
Bernd Bestel 2020-10-21 18:14:24 +02:00
parent 31fcdf377a
commit be18d59735
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
2 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@
'id' => '',
'label' => $userfield->caption,
'noNameAttribute' => true,
'min' => 0.0001,
'min' => 0,
'decimals' => 4,
'isRequired' => false,
'additionalCssClasses' => 'userfield-input',

View File

@ -316,7 +316,7 @@
@include('components.numberpicker', array(
'id' => 'calories',
'label' => 'Energy (kcal)',
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_amounts'] - 1) . '1',
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_amounts']),
'decimals' => $userSettings['stock_decimal_places_amounts'],
'value' => $value,
'invalidFeedback' => $__t('The amount cannot be lower than %s', '0'),