32 lines
627 B
PHP
32 lines
627 B
PHP
<?php
|
|
|
|
namespace App\Livewire;
|
|
|
|
use Livewire\Component;
|
|
|
|
class TimePickerForm extends Component
|
|
{
|
|
public $value;
|
|
public $name;
|
|
public $label;
|
|
public $format = 'H:i';
|
|
public $required = false;
|
|
|
|
public function mount($name, $label, $format = 'H:i', $required = false)
|
|
{
|
|
$this->name = $name;
|
|
$this->label = $label;
|
|
$this->format = $format;
|
|
$this->required = $required;
|
|
}
|
|
|
|
public function updatedValue()
|
|
{
|
|
$this->dispatch('timeChanged', $this->value);
|
|
}
|
|
|
|
public function render()
|
|
{
|
|
return view('livewire.time-picker-form');
|
|
}
|
|
} |