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

How to get the Week data in daypilot datepicker if we select any date?

Asked by pushplata
1 month ago.

Hi,
How I can find the week details if we are selecting any date from date picker.
kindly help.

Thanks in advance

Answer posted by Dan Letecky [DayPilot]
1 month ago.

You can switch the date picker to "week" mode when it selects a week automatically. Please see my answer here:

https://forums.daypilot.org/question/5812/how-to-create-the-week-wise-date-picker-in-scheduler

You can also get the start and end date of the corresponding week for any DayPilot.Date object using the firstDayOfWeek() method:

https://api.daypilot.org/daypilot-date-firstdayofweek/

const day = new DayPilot.Date("2022-09-02");
const start = day.firstDayOfWeek();
const end = start.addDays(7);
New Reply
This reply is
Your name (optional):