From 6132d836c1b4a239c64acdc6202a83e1866a653c Mon Sep 17 00:00:00 2001 From: Dan <79267265+dansysanalyst@users.noreply.github.com> Date: Tue, 14 May 2024 21:12:54 +0200 Subject: [PATCH] Add alternative to Flatpickr config --- docs/get-started/powergrid-configuration.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/get-started/powergrid-configuration.md b/docs/get-started/powergrid-configuration.md index 1e3c5c2..9a8b987 100644 --- a/docs/get-started/powergrid-configuration.md +++ b/docs/get-started/powergrid-configuration.md @@ -338,7 +338,9 @@ Add the following code to your project's `resources/js/app.js` file. import flatpickr from "flatpickr"; // [!code ++] ``` -Next, add the following code to your project's `resources/js/app.css` file. +Next, we need to load Flatpickr CSS. + +Add the following code to your project's `resources/js/app.css` file. ```css /* resources/js/app.css */ @@ -346,6 +348,14 @@ Next, add the following code to your project's `resources/js/app.css` file. @import "flatpickr/dist/flatpickr.min.css"; // [!code ++] ``` +Alternatively, you may import the CSS from the `resources/js/app.js` file. + +```javascript +// resources/js/app.js + +import 'flatpickr/dist/flatpickr.min.css';// [!code ++] +``` + Finally, adjust the language configuration to match your app's locale within the `config/livewire-powergrid.php` file, specifically in the `plugins` > `flatpickr` section. Example: