webplusmultimedia / date-time-range-picker
A date, dateTime, Time, Range Date picker with livewire and AlpineJs + TailwindCss
Installs: 156
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 1
Forks: 2
Open Issues: 0
Language:JavaScript
Requires
- php: ^8.1
- illuminate/contracts: ^10.0
- livewire/livewire: ^2.12
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.9
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- pestphp/pest-plugin-livewire: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
README
Here is a date, dateTime and date range picker for livewire made for Tall Stack
Support us
Here is a date, dateTime and date range picker for livewire made for Tall Stack
Installation
You can install the package via composer:
composer require webplusmultimedia/date-time-range-picker
Add the following settings to your Tailwindcss config file, tailwind.config.js
module.exports = { presets: [ require('./vendor/webplusmultimedia/date-time-range-picker/tailwind.config.js') ], content: [ '...', /* Date time Range */ './vendor/webplusmultimedia/date-time-range-picker/js/**/*.js', './vendor/webplusmultimedia/date-time-range-picker/resources/views/**/*.blade.php', ], theme: {} }
In your ./resources/js/app.js, import the js file
import './../../vendor/webplusmultimedia/filemanager/resources/dist/js/date_time_range'
Changing color theme
You can customize the color theme by changing just one variable in your tailwind.config.js
const colors = require('tailwindcss/colors') module.exports = { ... theme: { extend: { colors: { ... 'primary-datepicker' : colors.cyan // Or what ever you want }, }, }, ... }
Optionally, you can publish the views using, but don't need that.
php artisan vendor:publish --tag="date-time-range-picker-views"
Usage
In your blade livewire view :
<div class="pt-5"> <x-webplusm-date-time-range-picker type="range" label="Dates de formation" wire:model="date" /> </div>
Component attributes :
- type : {string} (date by default) date, datetime or range
- label : {string} (null by default) the Label to play
- minDate and maxDate : {ISO8601 (Carbon\CarbonInterface|null)} (null by default), if you need restricting dates
- lang : {dateString} (fr by default(e.g : fr-FR ...))
- minTime : {int} (7(h) by default) , minimum time to reach
- maxTime : {int} (17(h) by default) , maximum time to reach
- intervalMinute : {int} (5 by default) , interval up/down for minutes (time and datetime type)
Testing
Coming sooner
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.