Smart UI Components & Libraries – Grid, Scheduler, Gantt, Kanban for Angular, React, Next.js, Vue, Blazor, JavaScript › Forums › Scheduler › Nonworking hours per day
Tagged: nonworking, nonworkingHours
- This topic has 3 replies, 2 voices, and was last updated 3 years ago by
svetoslav_borislavov.
-
AuthorPosts
-
November 20, 2022 at 10:48 am #104008
Hadasa
ParticipantHi,
I need the ability to specify different working hours for each day.
For example: mon 9-7, tue-fri 9-5
How can I do this with smart-scheduler?
November 23, 2022 at 9:53 am #104018svetoslav_borislavov
ParticipantHi,
In the Angular version, there is a property “restricted” which accepts an array of objects. Each object has a date and hours. This describes the restricted dates with hours:
For example:
const today = new Date();
const currentDate = today.getDate();
const currentYear = today.getFullYear();
const currentMonth = today.getMonth();restricted: [
{ date: new Date(currentYear, currentMonth, currentDate), hours: [[0, 8], 20, 21, 22, 23] },
{ date: new Date(currentYear, currentMonth, currentDate – 2), hours: [[0, 3], 12, [20, 21]] },
{ date: new Date(currentYear, currentMonth, currentDate + 2), hours: [13] },
{ date: new Date(currentYear, currentMonth, currentDate – 5), hours: [[0, 3], 13, [21, 22]] },
{ date: new Date(currentYear, currentMonth, currentDate + 5), hours: [[0, 7], 13, [21, 22]] },
{ date: new Date(currentYear, currentMonth, currentDate – 10), hours: [[0, 8], 12, [20, 23]] },
{ date: new Date(currentYear, currentMonth, currentDate + 10), hours: [[0, 9], 12, [20, 23]] }
]In the next release, the property will be available in all versions
Best Regards,
Svetoslav BorislavovSmart UI Team
https://www.htmlelements.com/-
This reply was modified 3 years ago by
svetoslav_borislavov.
November 23, 2022 at 10:18 am #104020Hadasa
ParticipantThat will be great.
When will the next release be?
And another question:
How can I set half an hour to be restricted? let’s say I am showing the scheduler with timelineDayScale of 15 minutes.
November 25, 2022 at 11:26 am #104029svetoslav_borislavov
ParticipantHi,
The next release will be in December.
You cannot restrict half an hour. We do support restrictions for hours and days!
We hope you are happy using our product, if you face any additional questions, let us know!
Best Regards,
Svetoslav BorislavovSmart UI Team
https://www.htmlelements.com/ -
This reply was modified 3 years ago by
-
AuthorPosts
- You must be logged in to reply to this topic.