Skip to content

Commit

Permalink
Merge branch 'release/2.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
frontendschlampe committed Jan 29, 2016
2 parents 064cb26 + 78459d4 commit f8569c9
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class FormCalendarField extends \FormTextField
* Always set rgxp to `date`
*
* @param array $arrAttributes An optional attributes array
*/
*/
public function __construct($arrAttributes = null)
{
parent::__construct($arrAttributes);
Expand Down Expand Up @@ -127,6 +127,10 @@ public function parse($arrAttributes=null)
// correctly style the date format
$arrConfig['format'] = "'" . $this->dateformat_PHP_to_jQueryUI($dateFormat) . "'";

if (is_array($this->dateConfig)) {
$arrConfig = array_replace($arrConfig, $this->dateConfig);
}

// HOOK: allow to customize the date picker
if (isset($GLOBALS['TL_HOOKS']['formCalendarField']) && is_array($GLOBALS['TL_HOOKS']['formCalendarField'])) {
foreach ($GLOBALS['TL_HOOKS']['formCalendarField'] as $callback) {
Expand All @@ -153,7 +157,7 @@ public function parse($arrAttributes=null)

return parent::parse($arrAttributes);
}

/**
* Generate the widget and return it as string
*
Expand Down

0 comments on commit f8569c9

Please sign in to comment.