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

No of Days Calculation is getting reduced by One Day

Related article: PHP Annual Leave Scheduling (JavaScript/HTML5 Frontend, MySQL Database)
Asked by Anonymous
3 months ago.

When we apply for Leave, say from 01 Aug 2020 to 20 Aug 2020, No of Days on lve should be 20. System display 19 days. How can we amend it to display the dates as entered and accordingly the number of days. Thanks

Answer posted by Dan Letecky [DayPilot]
3 months ago.

If you only work with full days, you can switch to eventEndSpec="Date" mode which will translate the end date to "end of day":

https://doc.daypilot.org/scheduler/event-end-date-time/

But that will not work for half-day cells used in this tutorial.

Comment posted by Anonymous
3 months ago.

So what could be the way around then? i tried changing the value from 720 to 1440 but that distorts the table

Comment posted by Dan Letecky [DayPilot]
3 months ago.

You can change the config like this (keep the rest of the properties unchanged):

var dp = new DayPilot.Scheduler("dp", {
  scale: "Day",
  cellWidth: 40,
  // ...
});
This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.