Cannot change time format on calendar tooltip (table.php)

Home Forums Calendar Products Events Calendar PRO Cannot change time format on calendar tooltip (table.php)

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #27168
    Sandro
    Participant

    Hi,

    I cannot figure out why time stamp doesn’t change. On tooltip I’d like to use shot version of month, so I substitute F with M in the date_format. But nothing happens!
    echo ” – ” . date_i18n( get_option(‘date_format’, ‘F j, Y’), $end);
    echo ” – ” . date_i18n( get_option(‘date_format’, ‘M j, Y’), $end);
    FOr these two output is identical! how can this be?

    #27185
    Barry
    Member

    Either because of the way date_i18n() works:

    If the locale specifies the locale month and weekday, then the locale will take over the format for the date. If it isn’t, then the date format string will be used instead.

    Or because of the way get_option() works:

    The default value to return if no value is returned (ie. the option is not in the database)

    So there are at least two levels where the format you are specifying will not get through. Instead, perhaps you could use PHP’s date() function directly?

    #27426
    Sandro
    Participant

    Hi Barry, I did as advised. But now dates don’t get translated! Any other way to fix this?

    #27427
    Barry
    Member
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Cannot change time format on calendar tooltip (table.php)’ is closed to new replies.