Premium support for our pure JavaScript UI components


Post by gorakh.nath »

Hi
I can see in the sample attached above has following version:-

 "@bryntum/scheduler": "4.3.0",
 "@bryntum/scheduler-react": "4.3.0",

But I am using schedulerPro:-

 "@bryntum/schedulerpro": "4.3.0",
"@bryntum/schedulerpro-react": "4.3.0",

One more difference will come in grid :-

import { Grid } from '@bryntum/scheduler/scheduler.umd';

but in my code it will be:-

import { Grid } from '@bryntum/schedulerpro/schedulerpro.umd';

Is it possible to do pagination in schedulerpro?


Post by mats »

Scheduler paging is not supported, please see ticket: https://github.com/bryntum/support/issues/69

If you need this urgently we could be open for a feature sponsorship.


Post by gorakh.nath »

So right now we can't use below setting in schedulerPro?

bbar:{
 type:'pagingtoolbar'
}

Post by mats »

Nope, paging is only supported by the Grid component...


Post by gorakh.nath »

Let me correct my self , We cant use bbar (pagination) in grid import from schedulerpro?

 import { Grid } from '@bryntum/schedulerpro/schedulerpro.umd';

Post by saki »

Try the attached code. It is the code I've posted previously, only modified for Scheduler Pro.

Attachments
drag-from-grid.zip
(2.81 MiB) Downloaded 89 times

Post by gorakh.nath »

I am able to reproduce this issue and attaching the sample app which has same error on page load after adding the pagingtoolbar. This issue is coming only when I am adding localisation. In Sample app I added a method applyLocalization() which is causing the issue.
Please guid me what wrong I am doing in localisation. It is not failing If I remove the paging tool bar.

Attachments
paginationError.zip
(2.99 MiB) Downloaded 71 times

Post by Maxim Gorkovsky »

Problem is the way you define locale. You do not extend one, instead you create a locale with a subset of fields. PagingToolbar expects on of the localization properties to be a template function. It is missing from your custom locale and code throws. Once you remove LocaleManager.applyLocale('CustomLocale'); app works normally again.

You should either define a complete locale or extend one. See this API: https://bryntum.com/docs/scheduler/api/Core/localization/LocaleManager#function-extendLocale


Post by gorakh.nath »

Where should I add the local of paging tool bar . My localisation method is:-

 export const applyLocalization = () => {
  const browserLocale = getBrowserLocale();
  const localeLanguage = getLocaleLanguage();
  // apply locale to moment for localization of dates
  moment.locale(browserLocale);
  LocaleManager.registerLocale('CustomLocale', {
    desc: localeLanguage,
    locale: {
      localeName: 'CustomLocale',
      localeDesc: localeLanguage,
      Widget: {
        todayText: getLocalString('pf_today'),
        searchPlaceholder: `${getLocalString('pf_search')}..`
      },
      SchedulerBase: {
        noRows: getLocalString('pf_no_matches', 'No matches')
      },
      Grid: {
        noRows: getLocalString('pf_no_matches', 'No matches')
      },
      DateHelper: {
        locale: browserLocale
      }
    }
  });
  LocaleManager.applyLocale('CustomLocale');
};

Where do I need to add the localisation pf paging tool for the key like pageCountTemplate, pageCountTemplate, nextPage etc?
I already attached the sample application above.

Attachments
Screenshot 2021-11-23 at 12.33.31 PM.png
Screenshot 2021-11-23 at 12.33.31 PM.png (289.3 KiB) Viewed 1119 times

Post by alex.l »

You should extend existing locale or define all properties in your new locale. Please check docs:
https://bryntum.com/docs/scheduler-pro/guide/Scheduler/customization/localization

And the answer here: viewtopic.php?p=82027#p82027

All the best,
Alex


Post Reply