GuavaCZ / calendar

MIT License
140 stars 13 forks source link

[Question]: Edit views title #18

Closed aeq-dev closed 4 months ago

aeq-dev commented 4 months ago

What feature would you like to add?

Hello, How could we edit views titles? if we use for example : listDay,listWeek,listMonth views, it will be displayed like this : Screenshot 2024-07-25 at 18-21-20 Calendar - AMA-CAR

Notes

No response

lukas-frey commented 4 months ago

Hi, override the getOptions method and return an array with your settings according to the buttonText option here:

public function getOptions () {
    return [
        'buttonText' => [
            // your settings here
        ]
    ];
}
aeq-dev commented 4 months ago

Thanks :)

Mohammed-800 commented 3 months ago

@lukas-frey where Can I write that function?

lukas-frey commented 3 months ago

Inside your calendar widget class.

Mohammed-800 commented 3 months ago

@lukas-frey see image

Mohammed-800 commented 3 months ago

@lukas-frey thank you brother image

aeq-dev commented 1 month ago

Hi @lukas-frey How can we make it dynamic ? I want to change it based on some conditions or dependencies

lukas-frey commented 1 month ago

You can't. But you can override the Header title where "Calendar" is written and render your own view with Filament Actions there that toggle the view by calling setOption('view', <new-view>) on the calendar.

aeq-dev commented 1 month ago

Yes I got it ! thank you :))