Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.x dev - Docs update #29

Merged
merged 2 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<a href="https://packagist.org/packages/savannabits/filament-flatpickr"><img alt="Packagist" src="https://img.shields.io/packagist/dt/savannabits/filament-flatpickr.svg?style=for-the-badge&logo=count"></a>
</p>

Use **[Flatpickr](https://flatpickr.js.org/)** as your date picker in your Filament Forms and Panels.
Use **[Flatpickr](https://flatpickr.js.org/)** as your datepicker in the Filament Forms and Panels.

**NB: These docs are for v2.x, which only supports Filament 2.x. Support for Filament 3.x is still under development**

Expand Down Expand Up @@ -35,8 +35,8 @@ module.exports = {
```

## Usage
The Flatpickr component from this package a **datepicker, timepicker, datetimepicker, date range picker, week picker and month picker** based on your configuration.
Most of the fluent config methods you can align are similar to [Flatpickr's official](https://flatpickr.js.org/options/) options in naming.
You can use the Flatpickr component from this package as a **datepicker, timepicker, datetimepicker, date range picker, week picker, multiple date picker and month picker** based on your configuration.
Most of the fluent config methods are similar to [Flatpickr's official](https://flatpickr.js.org/options/) options in naming.
The rest of the methods are just like the other filament inputs.

Here are some examples of the methods. Refer to Flatpickr's Official Documentation for details on each of the configurations.
Expand Down
13 changes: 8 additions & 5 deletions src/Enums/FlatpickrMode.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<?php

namespace Savannabits\Flatpickr\Enums;
enum FlatpickrMode: string {
case RANGE = 'range';
case SINGLE = 'single';
case MULTIPLE = 'multiple';
case TIME = 'time';

enum FlatpickrMode: string
{
case RANGE = 'range';
case SINGLE = 'single';
case MULTIPLE = 'multiple';
case TIME = 'time';
}
5 changes: 4 additions & 1 deletion src/Enums/FlatpickrMonthSelectorType.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?php

namespace Savannabits\Flatpickr\Enums;
enum FlatpickrMonthSelectorType: string {

enum FlatpickrMonthSelectorType: string
{
case DROPDOWN = 'dropdown';
case STATIK = 'static';
}
26 changes: 14 additions & 12 deletions src/Enums/FlatpickrPosition.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
<?php

namespace Savannabits\Flatpickr\Enums;

enum FlatpickrPosition: string
{
case AUTO = "auto";
case ABOVE = "above";
case BELOW = "below";
case AUTO_LEFT = "auto left";
case AUTO_CENTER = "auto center";
case AUTO_RIGHT = "auto right";
case ABOVE_LEFT = "above left";
case ABOVE_CENTER = "above center";
case ABOVE_RIGHT = "above right";
case BELOW_LEFT = "below left";
case BELOW_CENTER = "below center";
case BELOW_RIGHT = "below right";
case AUTO = 'auto';
case ABOVE = 'above';
case BELOW = 'below';
case AUTO_LEFT = 'auto left';
case AUTO_CENTER = 'auto center';
case AUTO_RIGHT = 'auto right';
case ABOVE_LEFT = 'above left';
case ABOVE_CENTER = 'above center';
case ABOVE_RIGHT = 'above right';
case BELOW_LEFT = 'below left';
case BELOW_CENTER = 'below center';
case BELOW_RIGHT = 'below right';
}
5 changes: 4 additions & 1 deletion src/Enums/FlatpickrTheme.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?php

namespace Savannabits\Flatpickr\Enums;
enum FlatpickrTheme: string {

enum FlatpickrTheme: string
{
case DEFAULT = 'default';
case LIGHT = 'light';
case DARK = 'dark';
Expand Down
Loading
Loading