简体   繁体   中英

dhtmlx scheduler timeline month view: a event on two month

I've two problems with dhtmlx scheduler and I need your help;

  • Problem 1

I've a event who started at the last day of may and finish the first day of June. On the May view, I see my event object but he's not visible on the June view. The following event is visible on the two month view: May_lastDay -> June_firstDay+n (first day = no, second and more = yes). Furthermore, the events started the previous month is displayed but not to the start of first day, he start on the half of the day (graphicaly only) (ex:05/25-06/02) . I think the event finished at first day is not visibile because of this. => Go wath my edit 1

  • Problem 2

I can't grow up the event the on the previous month(ex: actually 06/02, I want to grow up for the event start the 05/31 instead of 06/02 (the last day of previous month = maximum, so 31 or 30 or 28 in function of number of days in the previous month). ==> Go watch my edit 2 for more information to solve the problem (I've a idea but I don't now how do this)

Config:

scheduler.createTimelineView({
        name: "timeline",
        x_unit: "day",
        x_date: "%d %D ",
        x_step: 1,
        x_size: 31,
        section_autoheight: false,
        y_unit: scheduler.serverList("visibleRooms"),
        y_property: "room",
        render:"bar",
        round_position:true,
        event_dy: "full",
        dy:60,
        second_scale:{
          x_unit: "month",
          x_date: "%F, %Y"
        },
        // scrollable: true,
        // scroll_position:new Date(2018, 0, 15)
      });

Picture 1 : May Picture 2: June

on the second last line of the second picture, there should be the red event on half of the first day of June.
on the 3rd and 7th lines there should not be a hole on the 1st day of June. (when we move the cursor on the event we can see that the dates are still good)

在此输入图像描述

在此输入图像描述

EDIT:

When I put my data in scheduler with scheduler.parse(JSON.stringify(myVar), "json"); The event ended at the first day of month (June 1) have not HTML element in Inspector. But the events ended after June 1 have the HTML element and is displaying.
05-30 to 06-01 = no HTML element
05-30 to 06-02 = have HTML element
06-01 to 06-02 = have HTML element

EDIT 2: How to make the first day on the schedule the last day of the previous month (while keeping it on the schedule for the previous month) ? because if I can do this, it will solve the problem 2 and it will only remain the problem 1.
example:
- May schedule: [April 31] [May 01] [May 02] [...] [May 31]
- Jun schedule [May 31] [Jun 01] [Jun 02] [....] [Jun 31]
- Jul schedule: [Jun 31] [Jul 01] [Jul 02] [...] [Jul 31]

  • Problem 1

I tried to reproduce the issue http://snippet.dhtmlx.com/9cd792b62 Events rendered correctly according to dates in data. If end_date is:

"end_date": "2019-06-01 00:00"

it means, that the event finishes on the last day in May and doesn't cover June 1st. If you want to cover also June 1st you should set end date "2019-06-02 00:00". Maybe you could at least use "2019-06-01 23:59:59", but the correct case is to use "2019-06-02 00:00". If it necessary for you, you could correct event dates in onEventLoading handler.

  • Problem 2

I don't fully understand the question. Please reproduce it with your data in the snippet system and share the updated link. Also specify steps to replicate the issue if it's necessary http://snippet.dhtmlx.com/13665e8a7

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM