Skip to content

Commit

Permalink
Fix #67: Correct init of locale dates for $.fn.kvDatepicker
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Dec 29, 2015
1 parent 47c47a8 commit e39cba2
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 38 deletions.
7 changes: 6 additions & 1 deletion CHANGE.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
Change Log: `yii2-widget-datepicker`
====================================

## version 1.3.6

**Date:** 29-Dec-2015

- (bug #67): Correct init of locale dates for `$.fn.kvDatepicker`.

## version 1.3.5

**Date:** 28-Dec-2015

- (bug #63): Fix extra brace bug in plugin JS code.
- (enh #64): Enhance and improve language & locale validation.
- (enh #65): Enhance styling for INLINE layout.

## version 1.3.4

Expand Down
6 changes: 4 additions & 2 deletions DatePicker.php
Original file line number Diff line number Diff line change
Expand Up @@ -380,10 +380,12 @@ public function registerAssets()
return;
}
$view = $this->getView();
$view->registerJs('jQuery.fn.kvDatepicker.dates={};');
if (!empty($this->_langFile)) {
LanguageAsset::register($view)->js[] = $this->_langFile;
DatePickerAsset::register($view)->js[] = $this->_langFile;
} else {
DatePickerAsset::register($view);
}
DatePickerAsset::register($view);
$id = $this->options['id'];
$input = "jQuery('#{$id}')";
$el = "jQuery('#" . $this->options['data-datepicker-source'] . "')";
Expand Down
5 changes: 0 additions & 5 deletions DatePickerAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@
*/
class DatePickerAsset extends AssetBundle
{
/**
* @inheritdoc
*/
public $depends = ['\kartik\date\LanguageAsset'];

/**
* @inheritdoc
*/
Expand Down
29 changes: 0 additions & 29 deletions LanguageAsset.php

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ to the `require` section of your `composer.json` file.

## Latest Release

> NOTE: The latest version of the module is v1.3.5. Refer the [CHANGE LOG](https://github.com/kartik-v/yii2-widget-datepicker/blob/master/CHANGE.md) for details.
> NOTE: The latest version of the module is v1.3.4. Refer the [CHANGE LOG](https://github.com/kartik-v/yii2-widget-datepicker/blob/master/CHANGE.md) for details.
## Demo

Expand Down

0 comments on commit e39cba2

Please sign in to comment.