Create a half day view

Hey,

I am using a purchased version 4 of DHTMLX Scheduler.
I have a monthly calendar with day view where the user can choose holiday days, and I want to revise so that the user will be able to choose half days (00->12 and 12->00), I managed to change the “onEventAdded” function so that it recognizes it correctly but the UI is still jumping on 1 day no matter what I am trying to do.
Is there any way to achieve this?

This is the view I am using:

scheduler.createTimelineView({
    name: "holidays_timeline",
    round_position: true, // Allow fine control over event positions
    x_unit: "hour", // Use hours instead of days
    x_date: "%d", // Display day and time
    x_step: 12, // Move in 12-hour increments
    x_size: 62, // 31 days * 2 (morning/evening slots)
    x_start: 0, // Start at midnight
    render: "bar", // Ensure events are displayed correctly
    dy: Math.ceil(21.5 * salon.app_info.workers_list.list().length), // Adjust worker row height
    event_dy: 40, // Increase event height for better readability
});

Thanks a lot in advance!

Hello @RonenLan ,

I’m not sure what the exact requirement is according to the logic of “holiday day” selection(as don’t know how exactly it works), but if the requirement is to just show timeline in 12 hour intervals, it should work pretty correctly, here is similar config, that the one you are using:
https://snippet.dhtmlx.com/oiqtf49s

And events are adding correctly, without any “jumpings”, here is a screencast:

It’s quite hard to suppose what exactly goes wrong in your case without more details, so could you please provide more information on how to reproduce the issue, or reproduce it in the demo above(open the demo=> reproduce the issue => click the “Save” button => send me the new link)?

Kind regards,

Hey
Thank you very much for the reply.
I actually made a mistake and I am using “days” render and not “bar”.
Also, I am using verion 4, a really old one.

Hello @RonenLan,

It’s still hard to suppose what exactly goes wrong, as even with “days” render, timeline seems to work correctly:
https://snippet.dhtmlx.com/57ied82w

Here is a screencast:

It may be helpful if you provide me more details on what exactly goes wrong, so I will try to provide an assistance.

Kind regards,