Support » Plugin: ByC WooCommerce Order Delivery or Pickup with Date Time Location - WooODT Lite » Datepicker not working with Catalan and Spanish language

  • Resolved anilexoticait

    (@anilexoticait)


    Hi ByConsole,
    Plugin works perfectly in English version while I switch the language then it stops working.
    Please suggest me fixes.
    Thanks

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author mdalabar

    (@mdalabar)

    Hi,

    I see the site language is in English, can you change it to other language, so that I can check it quickly.

    Thanks

    Hi language change work from frontend from site header.

    Plugin Author mdalabar

    (@mdalabar)

    Hi,

    As you are using GTranslate plugin it translates the calendar day names, month names that does not match according to jQuery UI datepicker calendar. This plugin rely on html lang attribute during page load but as in this case lang attribute is being changed via jQuery it is unable to switch calendar language respectively then.

    A quick resolution is to restrict the calendar to be translated by GTranslate plugin, to do so follow these steps and it will be fine then.

    Add this line

    
    jQuery("#ui-datepicker-div").addClass('notranslate');
    

    after line no 2407 where looks like

    	
    //alert(date);
    

    Then you need to do the same for time field as well, also before that change the time format to “24 hrs without AM/PM” else it translate the AM/PM as well.

    Add this line

    
    jQuery(".ui-timepicker-list li").addClass("notraslate");
    

    after line no 2371 where it look like

    
    jQuery('#byconsolewooodt_delivery_time').on('click',function(){
    
    

    Maybe I can update the plugin later if similar request comes again and again.

    Thanks

    anilexoticait

    (@anilexoticait)

    Thanks for your support.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Datepicker not working with Catalan and Spanish language’ is closed to new replies.