• Resolved Juha Mets?kallas

    (@juhametsakallas)


    I’m refugee from another calendar that ceased to function because of the changes made by Google. I have a couple of questions concerning how the date is displayed.

    1. How can force the calendar to always use a certain, say numerical, date format?
    2. There is a typografical error both in the number and string formats for my locale. How can fix those?
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author michielve

    (@michielve)

    Hi,

    Regarding 1:

    This was previously not possible to format the date, but it is now with the new version (20200615).

    You can specify a formatting string for the following settings (for shortcode, rewrite these properties like this: column_header_format etc.):

    columnHeaderFormat: daynames displayed on the columns (for month and weekviews)
    eventTimeFormat: format of date displayed in the events
    titleFormat: the text that is displayed in the header

    For information about this formatting string see: https://momentjs.com/docs/#/displaying/format/

    Regarding 2:

    This plugin uses fullcalendar, so if you see a mistake you can maybe create a new issue for the FullCalendar project (https://github.com/fullcalendar/fullcalendar/issues).

    • This reply was modified 4 years, 8 months ago by michielve.
    Thread Starter Juha Mets?kallas

    (@juhametsakallas)

    1. I’m not sure, if I understand correctly. If I want to change my compact calendar view (where header-right=””), so that instead of 15 – 21. kes?k. 2020 there would be only a numerical format, should I write title_format=moment().format("…") or what to manipulate?

    2. Ok, I will do.

    Plugin Author michielve

    (@michielve)

    You can do something like this:

    title_format="DD/MM/YYYY"

    This wil result in:

    14/06/2020 – 20/06/2020

    Or you can use localized formats:

    title_format="l"

    So you can choose any of the combination of letters you see on the https://momentjs.com/docs/#/displaying/format/ page.

    Thread Starter Juha Mets?kallas

    (@juhametsakallas)

    I tried title_format="D.M.YYYY", but ofc I hadn’t the formatting library until I installed your update. Thank you!

    PS: Where is the donation button for this plugin? I would like to buy a coffee for you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to format date?’ is closed to new replies.