H
H
hollanditkzn2017-08-11 10:29:51
Yii
hollanditkzn, 2017-08-11 10:29:51

Why does the currency format not work correctly?

I have a kartik-v/yii2-money widget and I have 0.00 R permanently displayed in the widget. You can only change it when you fully select it and you can only change the first digit after the ",". Can you tell me how to work with this widget?
In frontend/config/main.php

'components' => [
    'formatter' => [
        'class' => 'yii\i18n\formatter',
        'thousandSeparator' => ',',
        'decimalSeparator' => '.',
    ]
]

in view
<?= $form->field($model, 'oplata')->widget(MaskMoney::className(), [
                    'pluginOptions' => [
                        'suffix' => ' P',
                        'allowNegative' => false,
                        'allowZero' => true,
                    ]
            ]) ?>

If there are no solutions, then do not tell me an alternative widget?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question