Calendar plugin date event format


Topic: Calendar plugin date event format

jumpshotink pro premium priority asked 4 months ago

In the document for the Calendar plugin, it states that you can use a 12 hour format in the JS for an event. So for example, the code can be:

{
  summary: 'Call',
  description: 'Agree the terms of contracts',
  start: {
    date: '08/09/2020',
    dateTime: '08/09/2020 10:00 AM',
  },
  end: {
    date: '08/09/2020',
    dateTime: '08/09/2020 02:00 PM',
  },
  color: {
    background: '#292929',
    foreground: '#f5f5f5',
  },
}

When I tried this, the events did not show. It seems the only way to get them to show is using the dayjs format:

date: Calendar.dayjs().add(2, 'day').format('DD/MM/YYYY'),

Is there a way to get the event to show by just using the date? This would be very helpful as we are using a backend CMS data base to manage events using a date format for start and end times.

Thanks.


Grzegorz Bujański staff answered 4 months ago

Are you sure you are in a view where these events should be visible? Have you changed your view for September 2020? I created a snippet with 2 events dated August 2024 and they are visible: https://mdbootstrap.com/snippets/standard/grzegorz-bujanski/6212356#html-tab-view

Also make sure that you set the calendar to 12h format - I added the data attribute in the snippet: data-mdb-twelve-hour="true"


jumpshotink pro premium priority commented 4 months ago

Thanks - I got it to work.


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 7.3.2
  • Device: MAc
  • Browser: Firefox
  • OS: OS 14.5
  • Provided sample code: No
  • Provided link: No