Date Picker

3 posts by 2 authors in: Forums > CMS Builder
Last Post: November 27, 2014   (RSS)

By Djulia - November 22, 2014

Hi,

Is it possible to use a file of translation for Date Picker in cmsB ?

Thanks!

Djulia

By Dave - November 27, 2014 - edited: November 27, 2014

Hi Djulia,

It looks like the code for that isn't working correctly.  Can you try this?

  • Edit lib/menus/header.php
  • Replace the code between the <!-- datepicker --><!-- /datepicker --> tags with the following: 

<!-- datepicker -->
<?php
// load date picker language file
$datePickerLangRelPath = "/3rdParty/jqueryUI/i18n/jquery.ui.datepicker-{$SETTINGS['language']}.js";
$datepickerLangUrl = CMS_ASSETS_URL . $datePickerLangRelPath;
$datepickerLangPath = SCRIPT_DIR . $datePickerLangRelPath;

if (!$SETTINGS['language']) { print "<!-- datepicker language: default, no language selected -->\n"; }
elseif (is_file($datepickerLangPath)) { print "<script src='" .htmlencode($datepickerLangUrl). "'></script>\n"; }
else { print "<!-- datepicker language: not loaded, file doesn't exist: $datePickerLangRelPath -->\n"; }
?>
<!-- /datepicker -->

Let me know if that works for you. 

Thanks!

Update: Replaced <-- with <!-- in my post.

Dave Edis - Senior Developer
interactivetools.com