Laravel-Backpack / CRUD

Build custom admin panels. Fast!
https://backpackforlaravel.com
MIT License
3.11k stars 890 forks source link

In o'clock hours calendar operations doesn't show minutes in calendar view #5468

Closed miquelangeld closed 6 months ago

miquelangeld commented 6 months ago

Hi. Using Calendar operations if I create an entry with o'clock hour in the from field, for example 10:00, in calendar doesn't show the minutes, only the hour.

an example of two entries, one at 10:00 and another at 10:01

image

I think it should always show the time in the same format "h:i" instead

image

miquelangeld commented 6 months ago

By the way, this new calendar feature has saved me many hours of work, thank you!

pxpm commented 6 months ago

Hello @miquelangeld

You should be able to configure that using slotLabelFormat property: https://fullcalendar.io/docs/slotLabelFormat

You should be able to change that configuration using: CRUD::setOperationSetting('javascript-configuration', []);

Let me know if that helps.

Cheers

miquelangeld commented 6 months ago

Hello @pxpm thanks!! sorry I should have read the documentation more carefully.

I think slotLabelFormat only affect the slots in the day view:

image

I have achieved it with this configuration:

CRUD::setOperationSetting('javascript-configuration', [
            'views' => [
                'dayGridMonth' => [
                    'eventTimeFormat' => [
                        'hour' => 'numeric',
                        'minute' => '2-digit'
                    ]
                ]
            ]
        ]);

image

miquelangeld commented 6 months ago

I close the issue