When we set our DateHelper locale to french (fr), we are experiencing an issue with making changes to the date fields in the TaskEdit modal.
They properly display in the french format (DD/MM/YYYY). If we try to update the date using the left/right arrows, there's no problem.
However, if we try to adjust the dates by typing, then hit save button, it seems to interpret it as an english date (MM/DD/YYYY), reversing month and day before saving, and therefore causes bugs.
As a solution, we tried changing the date format in the locale parsers field, to just always display it in english format instead, but it doesn't take the config and just always displays it in french format.
Any ideas how to fix this?
- Screen Shot 2022-08-07 at 10.38.15 AM.png (114.78 KiB) Viewed 189 times
- Screen Shot 2022-08-07 at 10.33.09 AM.png (54.95 KiB) Viewed 190 times
Do you see this problem here https://bryntum.com/examples/gantt/localization/ ?
If not, please share your locale configs, how did you apply it, and date field configs and listeners, if any.
All the best,
It does seem to be working properly in that Gantt demo, as far as I can tell.
I've attached the french locale file.
I know it's being properly used, since if I set DateHelper.locale = 'en' in the file, the dates revert to english as anticipated.
However, when DateHelper.locale = 'fr' or 'fr-Ca', changes to the the DateHelper.parsers object has no impact and default is always shown (as above post), which then seems to cause the saving bug.
(default for fr -> DD/MM/YYYY, for fr-Ca -> YYYY-MM-DD).
- (7.19 KiB) Downloaded 7 times
Maybe the reasons parsers in the locale doesn't work is because TaskEdit startDateField is not a date nor a time field, but a DateTimeField?
It doesn't look like there's a format property to adjust that would fix the issue.
DateTimeField has properties to configure dateField and timeField separately.
Configuration should be the same as you apply to
Regarding to locale, it should work for this field as well. DateTimeField just a container with some extra API, that uses two fields inside with full functionality.
All the best,