Answer the question
In order to leave comments, you need to log in
Widget from kartik and Cyrillic?
Good evening.
In the form I use a widget from kartik DateControll.
<?= $form->field($model, 'date')->widget(DateControl::className(),
['type' => DateControl::FORMAT_DATE, 'displayTimezone' => 'Europe/Kiev']
)
?>
'datecontrol' => [
'class' => '\kartik\datecontrol\Module',
'displaySettings' => [
Module::FORMAT_DATE => 'd MMMM yyyy',
Module::FORMAT_TIME => 'HH:mm',
Module::FORMAT_DATETIME => 'd MMMM yyyy HH:mm'
],
'displayTimezone' => 'Europe/Kiev',
'autoWidgetSettings' => [
Module::FORMAT_DATETIME => ['pluginOptions' => [
'autoclose' => true,
'todayHighlight' => true,
'startDate' => date('d m Y'),
],
'readonly' => true],
Module::FORMAT_DATE => ['pluginOptions' => [
'autoclose' => true,
'todayHighlight' => true,
],
'readonly' => true],
Module::FORMAT_TIME => ['readonly' => true]
],
'saveSettings' => [
Module::FORMAT_DATETIME => 'php:U',
Module::FORMAT_DATE => 'php:U',
Module::FORMAT_TIME => 'php:U',
],
'ajaxConversion' => true,
]
'formatter' => [
'class' => 'yii\i18n\Formatter',
'dateFormat' => 'dd MMMM yyyy',
'defaultTimeZone' => 'Europe/Kiev',
'datetimeFormat' => 'php: j F H:i:s',
'locale' => 'ru'
]
Answer the question
In order to leave comments, you need to log in
The problem seems to have been resolved. The point was not in the formatter settings, but in the kartik widget itself.
On his demo page and on github , the command to install the widget is .
The version "dev-master" was installed
And, as I understand it, after updating to 2.0.13.1 and higher, the widget refused to work with the Russian language (and not only).
Solved the problem by deleting the datecontrol and reinstalling the widget.
Now the version is "^1.9" and while it works, a timestamp comes in the response from the server.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question