PHP code example of masoud91 / yii2-jalali-datepicker
1. Go to this page and download the library: Download masoud91/yii2-jalali-datepicker library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
masoud91 / yii2-jalali-datepicker example snippets
use masoud91\jalaliDatePicker\jalaliDatePicker;
echo $form->field(
$model,
'date'
)
->widget(
jalaliDatePicker::className(), [
'options' => array(
'format' => 'yyyy/mm/dd',
'viewformat' => 'yyyy/mm/dd',
'placement' => 'right',
'todayBtn'=> 'linked',
),
'htmlOptions' => [
'id' => 'date',
'class' => 'form-control',
'placeholder' => '1396/05/05',
'readonly' => 'readonly'
]
]);
php composer.phar