search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

AM/PM Incorrect on Event Header with "Clock12Hours" Setting

Asked by Steve M.
11 years ago.

There's a bug where the incorrect value of "PM" is used on "AM" times. To reproduce this, do the following:

1. Load up a series of events, making sure one event overlaps from one day into the second day. (example: Event starts at 11pm on first day, and ends at 1am on the next day).
2. Ensure that the next chronological event has a start time and end time within the "AM" on the second day.
3. Render the control to have a StartDate of the second day (with 0 hours, 0 minutes, and 0 serconds). Have the control use the "Clock12Hours" setting, and showing a day as having hours going from 12am through 11:59:59pm. My MVC3 snippet is below:

@Html.DayPilotCalendar("dpc", new DayPilotCalendarConfig
{
ViewType = ViewType.Day,
WeekStarts = WeekStarts.Sunday,
BackendUrl = @resultUrl,
StartDate = @Model.LastScheduleStartDay,
CellHeight = 30,
HourWidth = 50,
Width = "98%",
ShowToolTip = true,
ScrollPositionHour=0,
TimeFormat = TimeFormat.Clock24Hours
})

What is shown is that the day-crossing event appears at top, with a block from 12-midnight to 1am. Its header shows a start time of 11pm. All of this so far is correct.

However, the next event (example: 2am through 4am) will appear at the 2am block, but the header text will say "2:00pm". All further events on the second day in the "AM" will appear where they should visually, but will have "PM" instead of "AM".

(I reproduced this using the DayPilot Calendar Lite.)

Comment posted by Steve M.
11 years ago.

Actually, this seems to be happening with or without having a day-crossing event. Just loading a week's worth of events seems to show it on any day.

Answer posted by Dan Letecky [DayPilot]
11 years ago.

This bug is fixed now in the latest codebase. The fix will be included in the next release.

Thanks for reporting the issue!

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.