Chevron arrow in textInput
I have created a modal action in filament.Whose code is.
I want to add a chevron arrow in Rounded time textInput.
I have attached the image .how it is opening up the modal...and what I actually want.
Help me out please.
public static function modifyClockOutAction(): Action
{
return Action::make('modifyClockOut')
->modalHeading('Modify Rounded Time Stamp')
->mountUsing(function (ComponentContainer $form, $record) {
$actualTime = Carbon::parse($record->clock_out)->format('h:i A');
$roundedTime = Carbon::parse($record->clocked_out_RoundOff ?: $record->clock_out)->format('h:i A');
$form->fill([
'actual_time' => $actualTime,
'rounded_time' => $roundedTime,
]);
})
->form([
TextInput::make('actual_time')
->label('Actual Time')
->disabled(),
TextInput::make('rounded_time')
->label('Round Time')
])
->action(function (array $data, $record) {
$record->update([
'clocked_out_RoundOff' => $data['rounded_time'],
]);
Notification::make()
->title('Clock Out Time Updated')
->success()
->body("Rounded Clock Out time changed to {$data['rounded_time']}.")
->send();
})
->extraModalWindowAttributes(['class' => 'update-clock-out'])
->modalSubmitActionLabel("Save")
->modalCancelAction(false)
->modalCloseButton(false)
->modalWidth('md');
}
public static function modifyClockOutAction(): Action
{
return Action::make('modifyClockOut')
->modalHeading('Modify Rounded Time Stamp')
->mountUsing(function (ComponentContainer $form, $record) {
$actualTime = Carbon::parse($record->clock_out)->format('h:i A');
$roundedTime = Carbon::parse($record->clocked_out_RoundOff ?: $record->clock_out)->format('h:i A');
$form->fill([
'actual_time' => $actualTime,
'rounded_time' => $roundedTime,
]);
})
->form([
TextInput::make('actual_time')
->label('Actual Time')
->disabled(),
TextInput::make('rounded_time')
->label('Round Time')
])
->action(function (array $data, $record) {
$record->update([
'clocked_out_RoundOff' => $data['rounded_time'],
]);
Notification::make()
->title('Clock Out Time Updated')
->success()
->body("Rounded Clock Out time changed to {$data['rounded_time']}.")
->send();
})
->extraModalWindowAttributes(['class' => 'update-clock-out'])
->modalSubmitActionLabel("Save")
->modalCancelAction(false)
->modalCloseButton(false)
->modalWidth('md');
}


1 Reply
You could make it ->numeric()... but the arrows will be positioned as part of the native browser.