totaldebug / atomic-calendar-revive

An advanced calendar card for Home Assistant Lovelace.
https://docs.totaldebug.uk/atomic-calendar-revive
MIT License
422 stars 68 forks source link

Can't change date format #1431

Closed Luana-98 closed 6 months ago

Luana-98 commented 7 months ago

Is there an existing issue for this?

Current Behavior

I can't change the date format in the left column. I tried to use localized format but there is no behaviour

Expected behaviour

I would like to change date format into DD MM YYYY

Steps To Reproduce

No response

Mode

Event (default)

Card Version

9.6.1

Home Assistant Version

2024.2.3

Configuration

No response

Relevant log output

No response

Code of Conduct

github-actions[bot] commented 7 months ago

Hello @Luana-98, thank you for your interest in our work! If this is a bug report, please provide your configuration and any screenshots that would assist troubleshooting, otherwise we can not help you.

hheimbuerger commented 7 months ago

I'm not the OP, but might have the same failed expectation.

Using the following configuration:

- type: custom:atomic-calendar-revive
  entities: calendar.family
  dateFormat: "dddd, MMMM D, YYYY h:mm A"

  # the following options are just for simplification
  disableLocationLink: true
  showRelativeTime: false
  showDatePerEvent: true
  showLocation: false

I get this calendar event:

vivaldi_2024-02-28_17-35-01

Instead of 02 (the day number), I expected it to display "Saturday, March 02, 2024 8:00 AM".

Maybe this is a documentation issue. The description of dateFormat is just "Custom date format", but doesn't specify which date can be formatted. I expected it to be the date in the left column (which I am able to modify using f.e. showWeekDay, but it doesn't render the way I want it to!), but maybe that's not correct.

(Using version 9.6.1 according to the console, too.)

hheimbuerger commented 7 months ago

I found a working example of dateFormat in #1334:

- type: custom:atomic-calendar-revive
  entities: calendar.family
  dateFormat: "dddd, MMMM D, YYYY h:mm A"
  defaultMode: Calendar
  showDate: true

So I guess that dateFormat only applies to defaultMode: Calendar, not defaultMode: Events. The documentation does not properly reflect this, in my opinion.

Again, I'm not OP, so I might have just hijacked their issue. You shouldn't close the ticket until they confirm that they were also expecting dateFormat to work for defaultMode: Events.

marksie1988 commented 6 months ago

@hheimbuerger @Luana-98 the documentation probably needs some clarification here, dateFromat is for the card date, not the event dates.

image

its not currently possible to change the date format of the events themselves.