@props([ // name of the datepicker. This name is used when posting the form with the datepicker 'name' => 'bw-datepicker', // text to display in the label that identifies the input field 'label' => 'Date', // is the value of the date field required? used for form validation. default is false 'required' => 'false', // what should the time hours be displayed as. Default is 12 hour format // available options are 12, 24 'hours_as' => '12', 'hoursAs' => '12', // what format should the time be displayed in 'time_format' => 'hh:mm', 'timeFormat' => 'hh:mm', // when the timepicker is included, should the time be displayed with seconds. Default is false 'show_seconds' => 'false', 'showSeconds' => 'false', 'selected_hours' => '', 'selectedHours' => '', 'selected_minutes' => '', 'selectedMinutes' => '', 'selected_seconds' => '', 'selectedSeconds' => '', // By default only placeholders are displayed in the textbox(es) 'has_label' => 'false', 'hasLabel' => 'false', ]) @php // reset variables for Laravel 8 support $hours_as = $hoursAs; $time_format = $timeFormat; $show_seconds = $showSeconds; $selected_hours = $selectedHours; $selected_minutes = $selectedMinutes; $selected_seconds = $selectedSeconds; $has_label = $hasLabel; //-------------------------------------------------------- $name = preg_replace('/[\s-]/', '_', $name); $required_symbol = ($has_label == 'false' && $required == 'true') ? ' *' : ''; $is_required = ($required == 'true') ? 'required' : ''; @endphp
HH
MM
SS
AM