Home Unanswered Active Tags New Question

DayPilotMonth get visible start and end date

Is there any way to get the visible start and end date of the DayPilotMonth control?
Asked by Anonymous 4 years ago.
Replies
It's not available directly but you can calculate it the following way:

On the server-side:
// assuming that StartDate is day 1 of the given month
DateTime startDate = DayPilot.Utils.FirstDayOfWeek(DayPilotMonth1.StartDate);
DateTime endDate = DayPilot.Utils.FirstDayOfWeek(DayPilotMonth1.StartDate.AddMonths(1).AddDays(-1)).AddDays(6);
On the client side:
// "dpm" is the value of ClientObjectName
var startDate = dpm.startDate;
var endDate = DayPilot.Date.addDays(startDate, dpm.rows.length * 7 - 1);
I will make the results accessible using special properties/methods in the next release.
Comment posted by Dan Letecky 4 years ago.
New Reply
This reply is
Your name (optional):

DayPilot for ASP.NET WebForms, DayPilot for ASP.NET MVC, DayPilot for Java