Date Pickers Components

Pikaday datepicker in Laravel Livewire

Integration of Pikaday datepicker using AlpineJS and Livewire

UI Stack: Tailwind CSS

Pikaday Datepicker Livewire Component

Code

Sorry, this component's code is restricted
Sorry, this component's code is restricted

Overview

This component is a Laravel/Livewire implementation of the Pikaday Datepicker, a lightweight and modular datepicker for Javascript. The key features of this component include the selection of a specific date and the display of the selected date in a user-friendly format.

Installation

  • Copy the PikadayDatepickerComponent.php file and place it in your app/Livewire directory.
  • Copy the pikaday-datepicker-component.blade.php file and place it in your resources/views/livewire directory.

Integration

To integrate the Pikaday Datepicker into your existing Laravel project:

  • Include the component in your blade file by adding @livewire('pikaday-datepicker-component') to the place in your blade file where you want the datepicker to appear.

Usage

The Pikaday Datepicker component can be used by simply clicking on the input field, which will bring up a datepicker. After selecting a date, the selected date will be displayed below the input field.

Configuration

The component can be customized in the following ways:

  • The date format can be changed in the Pikaday configuration in the blade file. By default, it uses the 'MM/DD/YYYY' format.
  • The style of the datepicker can be customized using CSS. The default style can be found in the link in the 'styles' section of the blade file.

Date Range Picker Integration Component

Date Range Picker Component using Livewire and Tailwind CSS

UI Stack: Tailwind CSS

Code

Sorry, this component's code is restricted
Sorry, this component's code is restricted

Overview

This component is a date range picker for Laravel applications built with Livewire. It allows users to select a start date and an end date, and then it passes these dates back to your application. The component is highly customizable and can be integrated with existing Laravel projects.

Installation

Follow the steps below to implement the DateRangePickerIntegrationComponent into your Laravel project:

  • Copy the component file to your app/Livewire directory.
  • Copy the blade view to your resources/views/livewire directory.

For instance, your component file's path should look like this: app/Livewire/DateRangePickerIntegrationComponent.php.

The blade view file should be in: resources/views/livewire/date-range-picker-integration-component.blade.php.

Integration

To integrate the component into your Laravel project, you will need to include it in a blade file. Use the @livewire directive, followed by the component's class name in kebab-case. For example:

@livewire('date-range-picker-integration-component')

Usage

Once the component is integrated, it's ready to use. Users can select a date range using the component's built-in date picker UI. The selected start and end dates are stored in the $startDate and $endDate public properties respectively.

Configuration and Customization

You can customize the component's behavior by modifying its properties. For example, you can set default values for the start and end dates in the component's constructor:

public function __construct()
{
    $this->startDate = now();
    $this->endDate = now()->addWeek();
}

You can also customize the component's appearance by editing its blade view file.