Hi there, I would like to interact with the time range column in AgendaView to include the end date correctly for all those events marked as "allDay" in true, but I need to change the time format of the time range in 12h format including the am/pm like so:
agendaview-calendar.png (297.24 KiB) Viewed 658 times
Time format depends on localization and managed by locale property of DateHelper.
Same for all day event and "Ends " text
Localization file example
Calendar : {
Today : 'Today',
next : range => `Next ${range}`,
previous : range => `Previous ${range}`,
plusMore : value => `+${value} more`,
allDay : 'All day', // < --- all day text
endsOn : d => `Ends ${d}`, // <--- ends on text format , you can remove text and leave a placeholder only
DateHelper : {
locale : 'de', // <<--- this setting is manage date formats. as example for `en` it will be formatted in am/pm
All the rest is not configurable at the moment. Please let us know if it's enough to reach your goals and if not, please provide an idea how do you expect it should working.
Hi @alex, I already change the "endsOn" locale key like you told me:
...
"AgendaView": {
"Agenda": "Agenda",
"Day": "Día",
"Month": "Mes",
"Year": "Año",
"endsOn": d => `Vence el ${d}`, // <==== It works ... thanks
allDay: "Todo el día"
},
...
Now, if I change the main language to 'en' the time range in AgendaView appears correctly to "am/pm" ... but the month and day names changed to ENGLISH, I don't want to use ENGLISH, instead I have created a new locale language that is SPANISH, I just want to change the time range part of the AgendaView like so:
calendar-changes.png (281.69 KiB) Viewed 635 times
It uses a mode config called eventTimeFormat to generate that. It's 'HH:mm' by default, but you could change that in the mode config, or if you want to change it for all modes in the modeDefaults config.
It's not documented, sorry about that. All these little configurable tweaks were built in fro the start, but while building them, documenting them fell by the wayside a bit!
Here's what I have in the fix branch. This will be in the next point release, 5.1, not the next patch release. ListView and AgendaView have had brain surgery and the main branch, so the fix had to go here.
Screenshot 2022-03-16 at 09.35.13.png (59.66 KiB) Viewed 618 times