mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-09 07:28:43 +01:00
Et2Date: Avoid error localizing English
This commit is contained in:
parent
ef7c175814
commit
e5f238584e
@ -17,11 +17,14 @@ import {dateStyles} from "./DateStyles";
|
|||||||
import {LitFlatpickr} from "lit-flatpickr";
|
import {LitFlatpickr} from "lit-flatpickr";
|
||||||
import "flatpickr/dist/plugins/scrollPlugin.js";
|
import "flatpickr/dist/plugins/scrollPlugin.js";
|
||||||
|
|
||||||
import(egw.webserverUrl + "/node_modules/flatpickr/dist/l10n/" + (egw.preference('lang') + ".js")).then(() =>
|
if(egw.preference('lang') && egw.preference('lang') !== "en")
|
||||||
{
|
{
|
||||||
// @ts-ignore
|
import(egw.webserverUrl + "/node_modules/flatpickr/dist/l10n/" + (egw.preference('lang') + ".js")).then(() =>
|
||||||
flatpickr.localize(flatpickr.l10ns[egw.preference('lang')]);
|
{
|
||||||
});
|
// @ts-ignore
|
||||||
|
flatpickr.localize(flatpickr.l10ns[egw.preference('lang')]);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse a date string into a Date object
|
* Parse a date string into a Date object
|
||||||
|
Loading…
Reference in New Issue
Block a user