Skip to content

bug: flatpickr css not working properly #71

@Reyzan

Description

@Reyzan

What version of FlyonUI are you using?

v1.3.0

Which browsers are you seeing the problem on?

Chrome, All browsers

Reproduction URL

https://flyonui.com/docs/third-party-plugins/flatpickr/

Describe your issue

Bug Report: FlyonUI v1.3.0 - Flatpickr CSS Not Applying Correctly

Description

There is an issue in FlyonUI v1.3.0 when using Flatpickr. The CSS styles are not being applied correctly, causing incorrect rendering.

Tech Stack

  • Laravel
  • Vite
  • Livewire + Volt

Steps to Reproduce

  1. Install FlyonUI v1.3.0 and Flatpickr.
  2. Configure TailwindCSS and FlyonUI as follows:

tailwind.config.js

/** @type {import('tailwindcss').Config} */
export default {
	content: [
		"./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php",
		"./storage/framework/views/*.php",
		"./resources/views/**/*.blade.php",
		"./node_modules/flyonui/dist/js/*.js",
		"./node_modules/flatpickr/**/*.js",
	],
	plugins: [require("flyonui"), require("flyonui/plugin")],
	flyonui: {
		vendors: true,
	},
};
  1. Configure app.js which is compiled by Vite:

resources/js/app.js

import.meta.glob(["../images/**"]);
import "flyonui/flyonui";
import "./bootstrap";
import flatpickr from "flatpickr";
import "flatpickr/dist/flatpickr.css";

document.addEventListener("livewire:navigated", () => {
	window.HSStaticMethods.autoInit();
	// Initialize Flatpickr globally
	window.flatpickr = flatpickr;
});
  1. Run the application and check if Flatpickr's styles are correctly applied.

Expected Behavior

Flatpickr should apply its styles correctly when initialized.

Actual Behavior

  • Flatpickr does not apply its styles properly.
  • The date picker appears unstyled or incorrectly styled.

Additional Information

  • FlyonUI Version: v1.3.0
  • Flatpickr Version: Latest (at time of writing)
  • TailwindCSS Version: 3.4.17
  • Browser: Chrome / Firefox / Edge
  • Laravel Version: 12

Screenshot

Image
The year is missing and prev month button is not in correct position

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions