masoud91/yii2-jalali-datepicker

Bootstrap Date Picker for Yii2 Extension

Installs: 1 481

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:JavaScript

Type:yii2-extension

1.0.2 2021-11-02 10:41 UTC

This package is auto-updated.

Last update: 2024-09-29 06:02:23 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 masoud91/yii2-jalali-datepicker "*"

or add

"masoud91/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 following code :

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

?>