changing language in scheduler not working for webpack >= 4 versions?.


Good afternoon,

Lately we have been having few bugs with Vue Scheduler, I think it has to do with the Scheduler not being compatible/friendly with webpack versions higher than or equal to 4 or perhaps we need to add some extra things in the webpack config file?.
This time we have been trying to change the language of the scheduler.  We have been using the sample below as reference, all dependencies are installed via npm and it does not change the language.  Please see my attached webpack.base.conf.js and our package.json. To see if you guys can help us see what is wrong. What versions should we be working with?  At this point it is not possible for us to downgrade to versions you guys are working with such as webpack ("webpack":"^3.6.0").

I find it strange that for the vue  Treegrid component, the "L10n.Load()" works perfectly and it does change the language. But not for the Scheduler.  Thank you again for the support. We want to integrate our projects using this component.

revelant versions:
 "vue": "^2.6.11",
"babel-polyfill": "^6.26.0",
 "@syncfusion/ej2-vue-schedule": "^18.1.52",
"cldr-data": "^36.0.0",
"babel-preset-stage-2": "^6.22.0",
"css-loader": "^2.1.1",
"babel-loader": "^7.1.5",
"vue-loader": "^15.9.2",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.11",
"webpack-dev-server": "^3.11.0",
npm -6.12
node -12.16.3

Sample tried

<template>
  <div id="app">
    <div id="container">
      <ejs-schedule
        height="550px"
        :selectedDate="selectedDate"
        :eventSettings="eventSettings"
      >
        <e-views>
          <e-view option="Day"></e-view>
          <e-view option="Week"></e-view>
          <e-view option="WorkWeek"></e-view>
          <e-view option="Month"></e-view>
        </e-views>
      </ejs-schedule>
    </div>
  </div>
</template>
<script>
import Vue from "vue";
import { L10nloadCldrsetCulture } from "@syncfusion/ej2-base";
import {
  SchedulePlugin,
  Day,
  Week,
  WorkWeek,
  Month
from "@syncfusion/ej2-vue-schedule";
import * as localeText from "./locale.json";
import * as numberingSystems from "cldr-data/supplemental/numberingSystems.json";
import * as gregorian from "cldr-data/main/nl/ca-gregorian.json";
import * as numbers from "cldr-data/main/nl/numbers.json";
import * as timeZoneNames from "cldr-data/main/nl/timeZoneNames.json";

Vue.use(SchedulePlugin);
L10n.load(localeText);
loadCldr(numberingSystemsgregoriannumberstimeZoneNames);
setCulture('nl');

export default {
  data() {
    return {
      height: "550px",
      selectedDate: new Date(201854),
      eventSettings: {
        dataSource: [
          {
            Id: 1,
            Subject: "Burning Man",
            StartTime: new Date(201855150),
            EndTime: new Date(201855170)
          },
          {
            Id: 2,
            Subject: "Data-Driven Economy",
            StartTime: new Date(201854120),
            EndTime: new Date(201854140)
          },
          {
            Id: 3,
            Subject: "Techweek",
            StartTime: new Date(201854150),
            EndTime: new Date(201854170)
          }
        ]
      }
    };
  },
  provide: {
    schedule: [DayWeekWorkWeekMonth]
  }
};
</script>
<style>
@import "../node_modules/@syncfusion/ej2-vue-schedule/styles/material.css";
@import "../node_modules/@syncfusion/ej2-base/styles/material.css";
@import "../node_modules/@syncfusion/ej2-buttons/styles/material.css";
@import "../node_modules/@syncfusion/ej2-calendars/styles/material.css";
@import "../node_modules/@syncfusion/ej2-dropdowns/styles/material.css";
@import "../node_modules/@syncfusion/ej2-inputs/styles/material.css";
@import "../node_modules/@syncfusion/ej2-navigations/styles/material.css";
@import "../node_modules/@syncfusion/ej2-popups/styles/material.css";
</style>

https://ej2.syncfusion.com/vue/documentation/schedule/localization/


Thanks in advance
Best.
Tonathiu 

Attachment: dependencifiles_acc76817.rar

4 Replies

RV Ravikumar Venkatesan Syncfusion Team May 20, 2020 03:05 PM UTC

Hi Tonathiu, 

Greetings from Syncfusion support. 

We have validated your reported query “changing language in scheduler not working for webpack >= 4 versions?” at our end. We have prepared a sample based on your requirement with webpack v4.43.0. It can be available in the below link. 


Kindly try the above sample and get back to us If you would require further assistance. 

Regards, 
Ravikumar Venkatesan 



TO Tonathiu May 20, 2020 05:12 PM UTC

Thank you for your response. 
I try to copy paste the sample project you have sent us, since we now have the same dependencies. Now seems we are getting the following error : "Error in mounted hook: "TypeError: Cannot read property 'trim' of undefined" and the calendar seems to load forever not showing the data.

This error goes away when we take out the :locale = "locale" from the tag, but of course the translation does not happen. Any ideas? 
Thank you again! 




TO Tonathiu May 21, 2020 08:13 AM UTC

All working now! Thanks for making the sample.rar really helpful. Deleting node_modules and reinstalling vue-scheduler did the trick. 
Thanks again 



VM Vengatesh Maniraj Syncfusion Team May 21, 2020 08:20 AM UTC

Hi Tonathiu,

You are most welcome. 

We are happy that your problem has resolved.

Regards,
Vengatesh 

Loader.
Up arrow icon