Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing weekStartDay doesn't effect the scheduler timeAxis in LocaleManager #5741

Closed
taauntik opened this issue Dec 9, 2022 · 1 comment
Labels
bug Something isn't working forum Issues from forum OEM OEM customer premium

Comments

@taauntik
Copy link

taauntik commented Dec 9, 2022

Forum post

Howdy,

I Denmark - just like in Sweden - weeks start Mondays. If you copy/paste this code into the basic example (https://bryntum.com/products/scheduler/examples/basic/) week starts Sundays.

See the attached screenshot.

Screenshot 2022-12-08 at 20.35.58.png

Have I misconfigured something or?

import EnLocale from '../../lib/Core/localization/En.js';

//region Data


const currentLocale = {
  localeName: 'current',
  localeDesc: 'Current',
  DateHelper: {
    locale: 'En',
    weekStartDay : 3,
    nonWorkingDays: {
      0: true, // Sunday
      6: true, // Saturday
    },
  },
};

// use EN locale as a base and apply required customization
const locale = LocaleHelper.mergeLocales(EnLocale, currentLocale);

LocaleManager.registerLocale('current', { locale : locale });

// Set the current Bryntum locale
LocaleManager.applyLocale('current');

//endregion

const scheduler = new Scheduler({
    appendTo         : 'container',
    resources        : [],
    events           : [],
    startDate        : new Date(2017, 0, 1, 6),
    endDate          : new Date(2017, 2, 1, 20),
    viewPreset       : 'example',
    presets: [{
        id: "example",
        name: "example",
        defaultSpan: 7 * 4,
        timeResolution: {
            unit: "day",
            increment: 1,
        },
        headers: [
            {unit: "week", dateFormat: "W",},
            {unit: "month", dateFormat: "MMMM",},
            {unit: "day", dateFormat: "D",},
            {unit: "day", dateFormat: "ddd",},
        ],
    }
    ],
    rowHeight        : 50,
    barMargin        : 5,
    multiEventSelect : true,
    columns          : [
        { text : 'Name', field : 'name', width : 130 }
    ]
});
@taauntik taauntik added bug Something isn't working premium forum Issues from forum OEM OEM customer labels Dec 9, 2022
@arcady-zherdev
Copy link

arcady-zherdev commented Dec 9, 2022

Closing as not reproducible

@arcady-zherdev arcady-zherdev closed this as not planned Won't fix, can't repro, duplicate, stale Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working forum Issues from forum OEM OEM customer premium
Projects
None yet
Development

No branches or pull requests

2 participants