From d5fae8b9f047068b14c2f8ceb27e806ed7364b55 Mon Sep 17 00:00:00 2001
From: Paul <paulmakles@gmail.com>
Date: Tue, 6 Jul 2021 22:49:14 +0100
Subject: [PATCH] Fix: dayjs locales won't fully load if the locale isn't
 selected first.

---
 src/context/Locale.tsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/context/Locale.tsx b/src/context/Locale.tsx
index 72337f2..d49aa62 100644
--- a/src/context/Locale.tsx
+++ b/src/context/Locale.tsx
@@ -195,11 +195,12 @@ function Locale({ children, locale }: Props) {
                     `../../node_modules/dayjs/esm/locale/${target}.js`
                 );
 
+                dayjs.locale(target, dayjs_locale.default);
+
                 if (defn.dayjs) {
                     dayjs.updateLocale(target, { calendar: defn.dayjs });
                 }
 
-                dayjs.locale(target, dayjs_locale.default);
                 setDefinition(defn);
             },
         );
-- 
GitLab