faravaghi/yii2-jalali-datepicker

This package is abandoned and no longer maintained. No replacement package was suggested.

Bootstrap Date Picker for Yii2 Extension

Installs: 3 703

Dependents: 1

Suggesters: 0

Security: 0

Stars: 8

Watchers: 0

Forks: 3

Open Issues: 0

Language:JavaScript

Type:yii2-extension

v1.0 2016-02-06 07:18 UTC

This package is not auto-updated.

Last update: 2022-10-01 08:34:22 UTC


README

Jalali Date Picker for Bootstrap Yii2 Extension

Latest Stable Version Total Downloads License

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist faravaghi/yii2-jalali-datepicker "*"

or add

"faravaghi/yii2-jalali-datepicker": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

<?php 
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'
		]
	]);

?>

or without using the model:

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',
	),
]);