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

DayPilotMonth get visible start and end date

Asked by Anonymous
15 years ago.
Is there any way to get the visible start and end date of the DayPilotMonth control?
Comment posted by Dan Letecky
15 years ago.
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.
This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.