Skip to content

Commit

Permalink
Fix #16: Fix directory separator for assets path in setLanguage
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Jan 25, 2015
1 parent 952d68a commit b10b054
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
version 1.3.0
=============
**Date:** 21-Jan-2015
**Date:** 25-Jan-2015

- Update to latest release of datepicker plugin.
- (enh #8): Create Tajikistan translations.
- (bug #16): Fix directory separator for assets path in setLanguage.

version 1.2.0
=============
Expand Down
3 changes: 2 additions & 1 deletion DatePicker.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ public function init()
if (isset($this->form) && ($this->type === self::TYPE_RANGE) && (!isset($this->attribute2))) {
throw new InvalidConfigException("The 'attribute2' property must be set for a 'range' type markup and a defined 'form' property.");
}
$this->setLanguage('bootstrap-datepicker.', __DIR__ . "/assets/");
$s = DIRECTORY_SEPARATOR;
$this->setLanguage('bootstrap-datepicker.', __DIR__ . "{$s}assets{$s}");
$this->parseDateFormat('date');
$this->_id = ($this->type == self::TYPE_INPUT) ? 'jQuery("#' . $this->options['id'] . '")' : 'jQuery("#' . $this->options['id'] . '").parent()';
$this->registerAssets();
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ to the ```require``` section of your `composer.json` file.

## Latest Release

> NOTE: The latest version of the module is v1.3.0 released on 21-Jan-2015. 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.0. 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 b10b054

Please sign in to comment.