From: Coleman Watts Date: Thu, 26 Feb 2015 21:55:02 +0000 (-0500) Subject: CRM-16019 - Expose date/time format preferences to clientside X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=af3775b322b9e4f11d097067367f0ea7763f5f10;p=civicrm-core.git CRM-16019 - Expose date/time format preferences to clientside --- diff --git a/templates/CRM/common/l10n.js.tpl b/templates/CRM/common/l10n.js.tpl index 44f5498a55..5984e543f6 100644 --- a/templates/CRM/common/l10n.js.tpl +++ b/templates/CRM/common/l10n.js.tpl @@ -30,6 +30,8 @@ CRM.config.userFramework = {$config->userFramework|@json_encode}; CRM.config.resourceBase = {$config->resourceBase|@json_encode}; CRM.config.lcMessages = {$config->lcMessages|@json_encode}; + $.datepicker._defaults.dateFormat = CRM.config.dateInputFormat = {$config->dateInputFormat|@json_encode}; + CRM.config.timeIs24Hr = {if $config->timeInputFormat eq 2}true{else}false{/if}; // Merge entityRef settings CRM.config.entityRef = $.extend({ldelim}{rdelim}, {$entityRef|@json_encode}, CRM.config.entityRef || {ldelim}{rdelim});