PHP code example of faravaghi / yii2-jalali-datepicker

1. Go to this page and download the library: Download faravaghi/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/ */

    

faravaghi / yii2-jalali-datepicker example snippets


 
use faravaghi\jalaliDatePicker\jalaliDatePicker;

echo $form->field(
		$model, 
		'date'
	)
	->widget(
		jalaliDatePicker::className(), [
		'options' => array(
			'format' => 'yyyy/mm/dd',
			'viewformat' => 'yyyy/mm/dd',
			'placement' => 'left',
			'todayBtn'=> 'linked',
		),
		'htmlOptions' => [
			'id' => 'date',
			'class'	=> 'form-control'
		]
	]);


echo faravaghi\jalaliDatePicker\jalaliDatePicker::widget([
	'name' => 'startDate',
	'value' => '1397/06/20',
	'options' => array(
		'format' => 'yyyy/mm/dd',
		'viewformat' => 'yyyy/mm/dd',
		'placement' => 'left',
		'todayBtn'=> 'linked',
	),
]);

php composer.phar