Closed kenng closed 1 year ago
->displayFormat('YYYY-MM-DD(HH:mm)')
Sample usage
DateRangePicker::make('StartAndEndDate') ->setTimePickerOption(true) ->setTimePickerIncrementOption(2) ->setLinkedCalendarsOption(true) ->label('Event Date (start to end)') ->displayFormat('YYYY-MM-DD(HH:mm)') ->formatStateUsing(function ($record) { $start = Carbon::parse($record['StartTime']); $end = Carbon::parse($record['EndTime']); return $start->format('Y-m-d(H:i)') . " - " . $end->format('Y-m-d(H:i)'); }),
is formatStateUsing connected to the value, I believe we need to send a callback to JavaScript.
->displayFormat('YYYY-MM-DD(HH:mm)')
Sample usage