Premium support for our pure JavaScript UI components


Post by ext_mkucanda »

Hi,

We are using the latest version of the Gantt 5.6.8

We experience an error when changing Duration. I attached the image of an error in the print screen. When you double click on the cell it stays like this and it is not possible to save the new value.

We customised locale in the following way:

import { LocaleHelper } from '@bryntum/gantt';

import ganttLocale from '@bryntum/gantt/source/lib/Gantt/localization/De';

export const locale = LocaleHelper.mergeLocales(ganttLocale, {
	localeName: 'De',
	localeDesc: 'Deutsch',
	// ... a lot of fields are here, but this one is important:
	DateHelper: {
		        locale: 'de',
		        weekStartDay: 1,
		        unitNames: [
			{
				single: 'Millisekunde',
				plural: 'Millisekunden',
				abbrev: 'ms',
			},
			{
				single: 'Sekunde',
				plural: 'Sekunden',
				abbrev: 's',
			},
			{
				single: 'Minute',
				plural: 'Minuten',
				abbrev: 'min',
			},
			{
				single: 'Stunde',
				plural: 'Stunden',
				abbrev: 'Std.',
			},
			{
				single: 'Tag',
				plural: 'Tagen',
				abbrev: 'T',
			},
			{
				single: 'Woche',
				plural: 'Wochen',
				abbrev: 'W',
			},
			{
				single: 'Monat',
				plural: 'Monate',
				abbrev: 'M',
			},
			{
				single: 'Quartal',
				plural: 'Quartale',
				abbrev: 'Q',
			},
			{
				single: 'Jahr',
				plural: 'Jahre',
				abbrev: 'J',
			},
		],
		// Used to build a RegExp for parsing time units.
		// The full names from above are added into the generated Regexp.
		// So you may type "2 w" or "2 wk" or "2 week" or "2 weeks" into a DurationField.
		// When generating its display value though, it uses the full localized names above.
		unitAbbreviations: [
			['mil'],
			['s', 'sec'],
			['m', 'min'],
			['h', 'hr'],
			['d'],
			['w', 'wk'],
			['mo', 'mon', 'mnt'],
			['q', 'quar', 'qrt'],
			['y', 'yr'],
		],
		parsers: {
			L: 'DD.MM.YYYY',
			LT: 'HH:mm',
		},
		ordinalSuffix(number) {
			return number;
		},
	},
}

LocaleHelper.publishLocale({
	localeName: 'De',
	desc: 'Deutsch',
	locale,
});

// and later in the code
LocaleManager.applyLocale('De');

If I change Tag -> tag and Tagen -> tagen, then I don't have this issue. It appears only if it is uppercase. We would like to have it uppercase.

I tried to extend your example https://bryntum.com/products/gantt/examples/localization/ . I am not sure how to do it. Could you please have a look if you can reproduce this issue? I was able to reproduce it with German and French so I think that making unit name for day upper case is causing this issue that you can not change duration in the row.

Thank you for your help,

Mislav

Attachments
Screenshot 2024-03-08 at 12.53.38.png
Screenshot 2024-03-08 at 12.53.38.png (76.39 KiB) Viewed 141 times
Screenshot 2024-03-08 at 12.45.28.png
Screenshot 2024-03-08 at 12.45.28.png (66.64 KiB) Viewed 141 times

Post by xianerc »

Hi support team,

I am a colleague of Mislav and I found you already have a issue created related to this topic:
https://github.com/bryntum/support/issues/8497
I hope it can be resolved soon and just want to mention that it also affects the fields (duration, effort) in task editor

Best regards,
Xianer


Post by ghulam.ghous »

Hi there,

Thanks for reporting this. As you have mentioned, we already have a ticket to handle this issue. I have added a comment about your report as well and updated the ticket to check for duration and effort fields in task editor as well.

Regards,
Ghous


Post Reply