Any known issues with scheduler showing incorrect end times?

I’m observing an unusual problem with dhtmlxScheduler and can’t find a reason why it would occur, so I’m just covering all the bases. I don’t have a reason to suspect this is a dhtmlxScheduler bug, but I also haven’t been able to rule it out.

The scenario is this - intermittently, appointments will appear to have an end time much later than the time entered in the lightbox after they are saved. Steps to recreate when it does occur are:

  1. Drag event time in calendar unit view
  2. Customized light box appears
  3. Enter values in lightbox - for the sake of this example, say the event ends at 14:45
  4. Press save, do not refresh browser
  5. New appointment appears to end whenever the next appointment appears on the calendar, say 17:00
  6. Refresh the page in browser, event now ends at 14:45

I’ve confirmed that when this occurs, the end time sent to the server is correct, for example, something like this:

Parameters: {“start_date”=>“2011-01-22 11:00”, “!nativeeditor_status”=>“inserted”, “action”=>“dbaction”, “editing”=>“true”, “text”=>“New event”, “appttype”=>“1”, “id”=>“1294699456002”, “rec_pattern”=>"", “service_id”=>“8,00:45 “, “stylist_id”=>“2”, “controller”=>“events”, “customer_id”=>“249”, “end_date”=>“2011-01-22 14:45”, “rec_type”=>””}

This happens intermittently, so it’s very hard to diagnose. I have a heavily customized lightbox, I’m using recurring event, minical, agenda view, year view, and touch v2.3 JavaScripts and this is happening when the scheduler is dealing with a few hundred appointments. I also have attached events to onFullSync that performs a clearAll() and a load() from an XML data source and I do a resetLightBox() with the onAfterLightbox event to force a new lightbox to be rendered every time. So far I’ve only seen this happen on one-time (not recurring) events though.

Has anyone else ever seen this? Any recommendations on ways to troubleshoot it?

Thanks,
Chris

Most probably it is related to the lightbox customization, maybe custom code in it somehow affects event after lightbox closing.

The only place in code, where scheduler can change end_time of event during rendering is processing of last_hour settings ( event truncated by last_hour time ) - are you using first_hour and last_hour config options ?

Yes, I am using first_hour and last_hour customizations. Is there anything specific I could look at from a debugging perspective to rule that out? Breakpoints or something I could look at it in a javascript console?

The code in question is dhtmlxscheduler.js, scheduler._pre_render_events_line method

if (eh >= this.config.last_hour){ ev.end_date.setMinutes(0); ev.end_date.setHours(this.config.last_hour);

This is the only place where modification occurs, but I’m not sure how it can be incorrect.

Also, there was some similar strange error in past, they was caused by defining some config values of scheduler as strings. Be sure that all numeric values, which you are assign to scheduler configs is true number, not the strings with numeric values.