I was wondering how I could change the 'start' and 'finish' date format in the 'Edit task' menu, at the moment its in US format (MM/DD/YYYY) but I wish to change it to an Australian format (DD/MM/YYYY)
Also I'm curious as to if I can disable column sorting, shown in the picture below
Screen Shot 2020-09-25 at 9.48.20 am.png (31.51 KiB) Viewed 1118 times
import LocaleManager from '../../Core/localization/LocaleManager.js';
import parentLocale from '../../Scheduler/localization/En.js';
import LocaleHelper from '../../Core/localization/LocaleHelper.js';
const locale = LocaleHelper.mergeLocales(parentLocale, {
// your localization strings here
});
// "aus" - is unified name for Danish localization
LocaleManager.registerLocale('aus', { desc : 'Danish locale', locale : locale });
// and later when you need:
LocaleManager.applyLocale('aus');
I couldn't get it to work as I'm using require js and webpack 4. I'm getting errors saying optional chaining is not supported and therefore can't import anything besides the built gantt (gantt.module.js)
Instead I would like to replace the default edit task modal with a custom 'Swal' modal. Is there an event for editing tasks when right clicking and selecting 'edit' and also when double clicking the task?
I would like to add to the advice above that you need to override DateHelper class localization provided in Core/lib/Core/localization/En.js:
DateHelper : {
locale : 'en-US', // replace to Australian format
Then all dates in your application will follow the format you want. Otherwise you will localize just format in a specific widget.
I couldn't get it to work as I'm using require js and webpack 4. I'm getting errors saying optional chaining is not supported and therefore can't import anything besides the built gantt (gantt.module.js)
You can apply all the technics if you're using built version too. Alex just provided an example of localization. Basically short code snippets we provide are supposed to work if you put them into our examples, so you can check the solution. And usually they cannot be copied to the real application without adjustments.
Instead I would like to replace the default edit task modal with a custom 'Swal' modal. Is there an event for editing tasks when right clicking and selecting 'edit' and also when double clicking the task?