10

As you know Gregorian is default calendar in Magento, but in some countries like China, Japan, India, Iran and Arabian countries there are different calendars. I searched Magento backend and I didn’t find any options to select and change calendar.

I want use "Jalali" calendar, Persian original calendar. Now I need install new calendar.

If I know correctly there are 2 type calendar used in Magento.

  1. Zend framework PHP calendar
  2. Mihai Bazon Java Calendar

For first type I found that, there is an extension for Zend_Date called Zend_Calendar that it can convert important world calendars, such as Persian Jalali (hijri shamsi) calendar, Japanese Calendar, Hebrew Calendar, Chinese Calendar, Islamic Calendar and etc. Please see below link for more details: http://framework.zend.com/wiki/display/ZFPROP/Zend_Calendar+-+Thomas+Weidner My problem is that I don't know how can use this Zend calendar converter. or what files must be edited in Magento?

And for second type calendar I have an open source Persian jalali version of Mihai Bazon calendar wrote by Ali Farhadi in this link: http://farhadi.ir/works/jalalijscalendar I attached this Java calendar, if need.

I put this Java calendar in Magento and I replaced it with default Java calendar. But anything didn't change. Then I edited some files in Magento core. And I saw that when I click on calendar icon, pop up calendar didn’t appear.

Please help me to change my store default calendar to Jalali, and to other word people to have their own default calendars.

I think it will be very powerful and helpful if someone can solve this problem for Magento. Not just for Persian, yea all different calendar supported by Zend, or more.

It can be good idea for Magento team that they can use all Zend abilities in their powerful software program. It can be a drop down list in Magento installation progress in where we chose country, time zone and currency.

5

I have used the spanish calender in magento

Try this codes

jQuery

jQuery(function($){
$.datepicker.regional['es'] = {
    closeText: 'Cerrar',
    prevText: '<Ant',
    nextText: 'Sig>',
    currentText: 'Hoy',
    monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio',
    'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],
    monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun',
    'Jul','Ago','Sep','Oct','Nov','Dic'],
    dayNames: ['Domingo','Lunes','Martes','Miércoles','Jueves','Viernes','Sábado'],
    dayNamesShort: ['Dom','Lun','Mar','Mié','Juv','Vie','Sáb'],
    dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','Sá'],
    weekHeader: 'Sm',
    dateFormat: 'dd/mm/yy',
    firstDay: 1,
    isRTL: false,
    yearRange:"1950:2050",
    changeYear:true,
    changeMonth:true,
    showMonthAfterYear: false,
    yearSuffix: ''};
$.datepicker.setDefaults($.datepicker.regional['es']);});

In Phtml page i have added this codes

<input type="text" value="01/01/1970"class="input-text validate-age-below-18"   id="datepicker"/></p>                                                                       jQuery(function() {
jQuery.datepicker.setDefaults( jQuery.datepicker.regional[ "" ] );
jQuery( "#datepicker" ).datepicker( jQuery.datepicker.regional[ "es" ] );

});

Hope it will work for you too

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.