Zen Cart Logo
Forums / Setting Up Specials and SaleMaker / Problems with the small calendar in the Catalog menu

Problems with the small calendar in the Catalog menu

Locked

Views: 1,714

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
26 Feb 2009, 11:36 PM
#1
dani0157 avatar

dani0157

New Zenner

Join Date:
Feb 2009
Posts:
14
Plugin Contributions:
0

Problems with the small calendar in the Catalog menu

Hallo everyone,

I have a problem. A hour ago i tried to put a special. So i click on the special menu under Catalog and then i added a new special. Everything was fine, but then i saw that i made a mistake and i wanted to change the date so i click on edit and click on the start and end date, but when i click on the date the small box dosnt say like for example 26/02/2009 , but some code DATE_FOR2AT_SPIFFYCAL .
When i click "OK" then the start and end datum ( by the list screen ) is 30.11.2036 . And he dont want to select the dates that i select. He only show DATE_FOR2AT_SPIFFYCAL. When i click edit again then i see begin date: 30.11.2036 and end date 30.11.2036.

My version is 1.3.8a ( the latest )
I have installed the following addons:

Admin Activity Report
admin_notes_advanced_0-914
easy_populate_csv_1-2-5-5-csv-2
Flat Rate Clone
I have also edited the files :

/www/www/admin/includes/languages/english.php
/www/www/admin/includes/languages/dutch.php
/www/www/includes/languages/english.php
/www/www/includes/languages/dutch.php

so that i can use the EU standart date format e.g 30/02/2009
DD/MM/YYYY

I looked at the wiki tutorial on how to do that.

here is my /includes/languages/english.php

(just the piece the i changed )

// look in your $PATH_LOCALE/locale directory for available locales..
// on RedHat try 'en_US'
// on FreeBSD try 'en_US.ISO_8859-1'
// on Windows try 'en', or 'English'
  @setlocale(LC_TIME, 'en_US.ISO_8859-1');
  define('DATE_FORMAT_SHORT', '%d/%m/%Y');  // this is used for strftime()
  define('DATE_FORMAT_LONG', '%u %d %B, %Y'); // this is used for strftime()
  define('DATE_FORMAT', 'd/m/Y'); // this is used for date()
  define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S');

////
// $date is given in format mm/dd/yyyy
// raw date is in format YYYYMMDD, or DDMMYYYY
function zen_date_raw($date, $reverse = false) {
  if ($reverse) {
    return substr($date, 0, 2) . substr($date, 3, 2) . substr($date, 6, 4);
  } else {
    return substr($date, 6, 4) . substr($date, 3, 2) . substr($date, 0, 2);
  }
}

and here is the admin language file :

// look in your $PATH_LOCALE/locale directory for available locales..
// on RedHat6.0 I used 'en_US'
// on FreeBSD 4.0 I use 'en_US.ISO_8859-1'
// this may not work under win32 environments..
  @setlocale(LC_TIME, 'en_US.ISO_8859-1');
  define('DATE_FORMAT_SHORT', '%d/%m/%Y');  // this is used for strftime()
  define('DATE_FORMAT_LONG', '%u %d %B, %Y'); // this is used for strftime()
  define('DATE_FORMAT', 'd/m/Y'); // this is used for date()
  define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S');

////
// $date is given in format mm/dd/yyyy
// raw date is in format YYYYMMDD, or DDMMYYYY
function zen_date_raw($date, $reverse = false) {
  if ($reverse) {
    return substr($date, 0, 2) . substr($date, 3, 2) . substr($date, 6, 4);
  } else {
    return substr($date, 6, 4) . substr($date, 3, 2) . substr($date, 0, 2);
  }
}

Here are some images so that you can see what i mean.


my url is: http://www.games-en-consoles.com

18 Jun 2009, 4:34 PM
#2
leopolt_dk avatar

leopolt_dk

New Zenner

Join Date:
Aug 2008
Posts:
1
Plugin Contributions:
0

Re: Problems with the small calendar in the Catalog menu

it is: DATE_FORMAT_SPIFFYCAL,

...not: DATE_FOR2AT_SPIFFYCAL

BTW:
I have a similar problem. I get the spiffycal date selector and it inserts dates correctly - but after hitting update button both start and end dates are set to this 30/11/2036. Any ideas anyone?