Excluding booking system/datepicker from cache

Pending
Panagea - Hotel and Tours Booking WordPress Theme Panagea - Hotel and Tours Booking WordPress Theme February 05, 2020
Login to reply
Kelly R Support Agent
2 years ago

Hi,

Please find following code in /wp-content/themes/panagea/js/main.js file.  

$('input[name="dates"]').daterangepicker({

   autoUpdateInput: false,
   locale: {
    cancelLabel: 'Clear',
    /*daysOfWeek: [
            "aa",
            "Mo",
            "Tu",
            "We",
            "Th",
            "Fr",
            "Sa"
        ],
        monthNames: [
            "January",
            "February",
            "March",
            "April",
            "May",
            "June",
            "July",
            "August",
            "September",
            "October",
            "November",
            "December"
        ],*/
   }
 });

and replace with following code.

$('input[name="dates"]').daterangepicker({

   autoUpdateInput: false,
   locale: {
    cancelLabel: 'Clear',
  daysOfWeek: [
            "aa",
            "Mo",
            "Tu",
            "We",
            "Th",
            "Fr",
            "Sa"
        ],
        monthNames: [
            "January",
            "February",
            "March",
            "April",
            "May",
            "June",
            "July",
            "August",
            "September",
            "October",
            "November",
            "December"
        ],
   }
 });

And you should change weekdays and month names in it.

After that please minify main.js file and save it to main.min.js in the same directory. 

Please use https://javascript-minifier.com/ 

And then check your website again.

And about merging js, we have not any recommendation.

Best Regards,

Wolter de Haan
2 years ago

And another question: where can I translate the datepicker? I need it to be in Dutch. The days show as Su, Mo, Tu, We, Th, Fr, Sa. I need to translate that. Where can I do it? Thanks

Wolter de Haan
2 years ago

Hi, I want to group my .js files but when I do, the datepicker stops working. What files do I need to exclude from caching to make it work?