Important note: This package it's just an Alpha test and my first Laravel Package so be careful using it! or don't use it at all :S
Example for input text
<x-EhtuBlade::input.text wire:model.lazy="model.attribute" name="attribute" errorTarget="model.attribute"/>
Input select example:
💡:keyvalues should be an associative array defined in the Livewire component
<x-EhtuBlade::input.select
wire:model.lazy="model.attribute"
name="atribute"
:keyValues="$preuVariacio::PREU_VARIACIONS_ZONES"
errorTarget="model.attribute" />
DataRangePicker example:
<span>From to <x-input.date-range-picker wire:model.defer="dateRange" id="dateRange" /></span>
To use dateRangePicker include the following files in your html header and footer:
Header:
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css" />
Footer:
<script type="text/javascript" src="https://cdn.jsdelivr.net/jquery/latest/jquery.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/momentjs/latest/moment.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script>
Check documentacion about date range picker at http://www.daterangepicker.com/#examples