Our pure JavaScript Scheduler component


Post by henrikbackman »

I've looked trough your docs and cant find an answer to my question.

Is there a setting for displaying week nr in the header when you zoom in? Instead of it saying "m|t|w|t|s|s" I'd like it to say "w.21" or something similar. Do you understand?

Thanks

Post by mats »

You will need to localize our ViewPresets then, please see this guide: https://bryntum.com/docs/scheduler/#gui ... ization.md

Date formats here: https://bryntum.com/docs/scheduler/#Com ... DateHelper

Post by henrikbackman »

Yeah, but how do I use that in harmony with the zoom feature? It doesn't seem to be viewPresets for certain zoomLevels.

Post by pmiklashevich »

import LocaleManager from '../../lib/Common/localization/LocaleManager.js';

LocaleManager.extendLocale('En', {
    PresetManager : {
        dayAndWeek : {
            topDateFormat : 'w.W'
        },
        weekAndDay : {
            middleDateFormat : 'w.W'
        },
        weekAndMonth : {
            middleDateFormat : 'w.W'
        },
        weekAndDayLetter : {
            middleDateFormat : 'w.W'
        },
        weekDateAndMonth : {
            middleDateFormat : 'w.W'
        },
        week : {
            middleDateFormat : 'w.W'
        }
    }
});

PresetManager.getPreset('weekDateAndMonth').tickWidth = 50;

PresetManager.onLocalized(); // private but required to apply changes
Please copy-paste this code to examples/configuration/app.js to see how it works

P.S. I've created a ticket to get rid of the private dependency: https://app.assembla.com/spaces/bryntum/tickets/8460

Cheers,
Pavel

Pavlo Miklashevych
Sr. Frontend Developer


Post Reply