Month and Year

For Card payment i want just month and year i dont want date is there a way ??
No description
11 Replies
GHOST-117
GHOST-1175mo ago
i want to hide the dates i just want month and year
JJSanders
JJSanders5mo ago
Did you try to play with the format function?
DatePicker::make('date_of_birth')
->format('m/Y')
DatePicker::make('date_of_birth')
->format('m/Y')
GHOST-117
GHOST-1175mo ago
yes DatePicker::make('ExpiryDate')->format('m/y') ->disabledDates(function () { $start = Carbon::now()->addMonth()->startOfMonth(); $end = $start->copy()->addMonth()->endOfMonth(); $period = CarbonPeriod::create($start, $end);
$weekends = []; foreach ($period as $date) { if ($date->isWeekend()) { $weekends[] = $date->format('Y-m-d'); } }
return $weekends; }) ->label('Expiry Date') ->placeholder('mm/yy') ->required(),
JJSanders
JJSanders5mo ago
Why are you using DatePicker for this you just want month and. year
GHOST-117
GHOST-1175mo ago
https://filamentphp.com/plugins/coolsam-flatpickr got this but not able to install in V2
Filament
Flatpickr by Sam Maosa - Filament
Use Flatpickr as your datepicker in the Filament Forms and Panels
GHOST-117
GHOST-1175mo ago
yes
JJSanders
JJSanders5mo ago
So you're using v2?
GHOST-117
GHOST-1175mo ago
yes
JJSanders
JJSanders5mo ago
Flapickr has a v2 version as well
GHOST-117
GHOST-1175mo ago
yes but it show Asset not found while installing may be iam missing something....... checking now....
JJSanders
JJSanders5mo ago
GitHub
GitHub - savannabits/filament-flatpickr at main
Extend your Filament Date-Picking with Flatpickr. Contribute to savannabits/filament-flatpickr development by creating an account on GitHub.
Want results from more Discord servers?
Add your server
More Posts