Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dash between event start and end times is "undefined" with eventTimeFormat and moment plugin #5493

Closed
blutorange opened this issue Jun 13, 2020 · 5 comments

Comments

@blutorange
Copy link

Bug Reports

Version: FullCalendar v5-beta.4

I'm looking into updating the Schedule component for PrimeFaces, which uses FullCalendar. While doing so, I came across a minor issue:

  • FullCalendar with moment plugin
  • Option eventTimeFormat set to some value such as HH:mm:ss
  • An event with a start and end time in timeGridDay displays as 15:38:02undefined16:08:02 (the dash between the times is missing)

To Reproduce: https://codesandbox.io/s/jolly-brown-hwbvy?file=/src/DemoApp.vue (not specific to vue, also happens with a plain webpack build without a framework)

image

@acerix acerix changed the title Wrong formatting for eventTimeFormat with moment plugin Dash between event start and end times is "undefined" with eventTimeFormat and moment plugin Jun 16, 2020
@acerix
Copy link
Member

acerix commented Jun 16, 2020

Thanks, confirmed.

@jefbarn
Copy link

jefbarn commented Jun 22, 2020

Seeing the same on v5 final and Luxon plugin.

Edit:
Found the workaround in the docs. Seems the api changed a bit:
From:
eventTimeFormat: 'HH:mm',
To:
eventTimeFormat: {
hour: '2-digit',
minute: '2-digit',
meridiem: false
},

@blutorange
Copy link
Author

Yeah, that definitely works. As far as I can tell, we already had to pass an object to eventTimeFormat even in v4. Though the moment plugin should add support for passing a moment date-time string instead.

@citylims

This comment has been minimized.

@arshaw arshaw added this to the next-minor milestone Jun 25, 2020
@arshaw arshaw closed this as completed in 0f58884 Jun 27, 2020
@arshaw
Copy link
Member

arshaw commented Jun 29, 2020

fixed in v5.1.0

https://codesandbox.io/s/old-wood-qxh91?file=/src/DemoApp.vue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants