Jump to content

Archived

This topic is now archived and is closed to further replies.

Xpajun

Datepicker Problem

Recommended Posts

This is in template-top.php:

 

<?php
 if (tep_not_null(JQUERY_DATEPICKER_I18N_CODE)) {
?>
<script type="text/javascript" src="ext/jquery/ui/i18n/jquery.ui.datepicker-<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>.js"></script>
<script type="text/javascript">
$.datepicker.setDefaults($.datepicker.regional['<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>']);
</script>
<?php
 }
?>

 

My store is not echoing the JQUERY_DATEPICKER_I18N_CODE which gives the local language changes causing a 404 error.

 

Anyone have any idea where the code is being returned from (should return en-GB)?

Share this post


Link to post
Share on other sites

This is in template-top.php:

 

<?php
 if (tep_not_null(JQUERY_DATEPICKER_I18N_CODE)) {
?>
<script type="text/javascript" src="ext/jquery/ui/i18n/jquery.ui.datepicker-<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>.js"></script>
<script type="text/javascript">
$.datepicker.setDefaults($.datepicker.regional['<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>']);
</script>
<?php
 }
?>

 

My store is not echoing the JQUERY_DATEPICKER_I18N_CODE which gives the local language changes causing a 404 error.

 

Anyone have any idea where the code is being returned from (should return en-GB)?

/public_html/ext/jquery/ui/i18n/jquery.ui.datepicker-en-GB.js

Share this post


Link to post
Share on other sites

/public_html/ext/jquery/ui/i18n/jquery.ui.datepicker-en-GB.js

 

That is the script that it eventually calls (assuming you are in GB) but " JQUERY_DATEPICKER_I18N_CODE " is the part that detects the language so the right language can be called and it is that bit that is not working and it obviously can't come from the file or script that it calls

Share this post


Link to post
Share on other sites

I found this in my includes/languages/english.php

define('JQUERY_DATEPICKER_I18N_CODE', ''); // leave empty for en_US; see http://jqueryui.com/demos/datepicker/#localization

 

There is also a link to the various language codes

Share this post


Link to post
Share on other sites

Thank you George, my datepicker is actually working now; and another lesson learnt - check the old file for differences before assuming it's the same as the new one :rolleyes:

Share this post


Link to post
Share on other sites

×