Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
594341fb
Commit
594341fb
authored
May 25, 2013
by
Alexander Kochetov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
language as code, not bundle
parent
ca86a3e2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
DatePicker.php
framework/yii/jui/DatePicker.php
+5
-4
No files found.
framework/yii/jui/DatePicker.php
View file @
594341fb
...
@@ -17,7 +17,7 @@ use yii\helpers\Html;
...
@@ -17,7 +17,7 @@ use yii\helpers\Html;
*
*
* ```php
* ```php
* echo DatePicker::widget(array(
* echo DatePicker::widget(array(
* 'language' => '
yii/jui/datepicker/i18n/
ru',
* 'language' => 'ru',
* 'model' => $model,
* 'model' => $model,
* 'attribute' => 'country',
* 'attribute' => 'country',
* 'clientOptions' => array(
* 'clientOptions' => array(
...
@@ -30,7 +30,7 @@ use yii\helpers\Html;
...
@@ -30,7 +30,7 @@ use yii\helpers\Html;
*
*
* ```php
* ```php
* echo DatePicker::widget(array(
* echo DatePicker::widget(array(
* 'language' => '
yii/jui/datepicker/i18n/
ru',
* 'language' => 'ru',
* 'name' => 'country',
* 'name' => 'country',
* 'clientOptions' => array(
* 'clientOptions' => array(
* 'dateFormat' => 'yy-mm-dd',
* 'dateFormat' => 'yy-mm-dd',
...
@@ -45,7 +45,8 @@ use yii\helpers\Html;
...
@@ -45,7 +45,8 @@ use yii\helpers\Html;
class
DatePicker
extends
InputWidget
class
DatePicker
extends
InputWidget
{
{
/**
/**
* @var string the jQuery UI datepicker widget language bundle.
* @var string the locale ID (eg 'fr', 'de') for the language to be used by the date picker.
* If this property set to false, I18N will not be involved. That is, the date picker will show in English.
*/
*/
public
$language
=
false
;
public
$language
=
false
;
/**
/**
...
@@ -62,7 +63,7 @@ class DatePicker extends InputWidget
...
@@ -62,7 +63,7 @@ class DatePicker extends InputWidget
echo
$this
->
renderWidget
()
.
"
\n
"
;
echo
$this
->
renderWidget
()
.
"
\n
"
;
$this
->
registerWidget
(
'datepicker'
);
$this
->
registerWidget
(
'datepicker'
);
if
(
$this
->
language
!==
false
)
{
if
(
$this
->
language
!==
false
)
{
$this
->
getView
()
->
registerAssetBundle
(
$this
->
language
);
$this
->
getView
()
->
registerAssetBundle
(
"yii/jui/datepicker/i18n/
$this->language
"
);
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment