Renders a Persian Web Toolkit's Persian Date Picker (Reza Babakhani's nice work.)
The preferred way to install this extension is through composer.
Either run
composer require mrlco/yii2-jalali-datepicker:~1.1.0
or add
"mrlco/yii2-jalali-datepicker" : "~1.1.0"
to the require section of your application's composer.json
file.
From v2.0.0 - Updated to use Bootstrap 4
This widget renders a Bootstrap Persian DatePicker input control. Best suitable for model with date string attribute.
There are two ways:
// as a widget
<?= mrlco\datepicker\Datepicker::widget([
'model' => $model,
'attribute' => 'date',
'template' => '{addon}{input}',
'clientOptions' => [
'format' => 'YYYY/MM/DD'
]
]);?>
// with an ActiveForm instance
<?= $form->field($model, 'date')->widget(
mrlco\datepicker\Datepicker::className(), [
'inline' => true,
'template' => '<div class="well well-sm" style="background-color: #fff; width:250px">{input}</div>',
'clientOptions' => [
'format' => 'YYYY/MM/DD'
]
]);?>
//use without any model
<?= mrlco\datepicker\Datepicker::widget([
'name' => 'Test',
'value' => '1394/03/23',
'template' => '{addon}{input}',
'clientOptions' => [
'format' => 'YYYY/MM/DD'
]
]);?>
The MIT License.
With Gregorian and Persian (Jalaali) Calendar
Bootstrap Persian/Gregorian Date Time Picker
A datepicker component for select Persian date
Modern React Persian Mobile Date and Time picker
A pure JS Persian datepicker, powered by Typescript :)
An advance Jalaali (shamsi, persian) datepicker containing multiple datepicker types such as, range datepicker
A persian(jalaali, jalali, shamsi) date input with picker, which allows the user to type or select the date from the picker.
A free JavaScript Jalali (Persian) and Gregorian (Miladi) dual datepicker library for Blazor applications