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

How to change the displayed end date of selected range

Asked by Anonymous
2 years ago.

Hi,
If I select a whole day e. g. 09.12.21 then the schedular shows in the tooltip of the selected range 10.12.21 as the end date. See please the attached screenshot.

Is this the default behavior? If yes, than what's the idea behind it?

Can I change it so it will show 09.12.21 as the end date?

Regards

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

By default, the Scheduler works with exact date points. The end of such selection is "2021-12-10T00:00:00" which results in "Dezember 10, 2021" in the label. This allows the same logic to be applied regardless of the scale (days vs hours, etc.).

If you only work with a scale that displays one day per cell you can adjust the behavior using eventEndSpec property:
https://doc.daypilot.org/scheduler/event-end-date-time/

If you use eventEndSpec = "Date" it will treat the end as date-only value and it will display "Dezember 9, 2021" in the label.

You can also override the text manually using onTimeRangeSelecting event handler:
https://api.daypilot.org/daypilot-scheduler-ontimerangeselecting/

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