Bug when using mark_now with units view

I’ve got units view working however if I enable the ‘mark_now’ option I get the following error:

Uncaught TypeError: Cannot read property ‘section_id’ of undefined

Stack trace:
g
scheduler.locate_holder_day
scheduler._reset_scale
scheduler._reset_scale
scheduler.update_view
scheduler.setCurrentView
scheduler.init

It seems the locate_holder_day method in the main script is not passing the second argument (‘ev’) to the fix_und method in the units script.

Any ideas on a fix for this? Also is there somewhere we can subscribe to updates so that we know when a new version of DHTMLXScheduler is released?

Thanks

I am getting the same behavior. Thank you for the post!

Hello,

Thank you for the feedback.
We will look into this issue and post update then it’s ready.

Kind regards,
Ilya

Hello,

Sorry for the late response, please try updated your dhtmlxscheduler.js and dhtmlxscheduler_units.js files with the updated version.

Kind regards,
Ilya
mark_now_update_20110930.zip (34.5 KB)

Thanks Ilya,

I can confirm that the time_now is showing up in units view which is great.

However, I am using an updated view of dhtmlxscheduler_limit.js, from this thread here:
viewtopic.php?f=6&t=19559&hilit=blocktime&start=20

And when I click on the scheduler with this new update you have just posted there is an error thrown:

‘Cannot read start_date of undefined’.

Would be great if these could work together.

Is there a plan to release an updated version of the scheduler with all these fixes integrated and working together?

Thanks

Also, I’ve just noticed that the ‘current time’ line is shown for days in the past. It should only be shown for the current day.

Hello,

Can’t reproduce this issue. I’ve attached screenshot, where should I click or what do I need to do?
If your site is available on the internet, please attach link.

Absolutely. This is a fresh baked solution which didn’t cause problems to me. There unfortunately still could be some issues as they are not tested thoroughly.

Thanks. I’ve updated files.

Kind regards,
Ilya
mark_now_units_20110930_v2.zip (4.52 KB)


The new file has fixed the mark now line appearing the past.

For the click error, it happens when I click anywhere on the scheduler, whether it’s in blocked time or not in blocked time.

I tried replacing the minified version with the ext_limit.js file from the zip file in here:
viewtopic.php?f=6&t=19559&hilit=blocktime&start=20

However the src version didn’t work (no blocking out time and no errors on click)

Hello,

If you are working with some sample, can you please archive it as it is and attach here so I could check the problem?
Or if your site is available on the Internet - please send me a link.

Kind regards,
Ilya

Please find attached a small example showing the error I’m getting. I’m using Chrome on OS X. The error comes up in the console when you click on the scheduler.

Hope this helps
dhtmlscheduler-test.zip (50 KB)

Hello,

Thanks for the complete sample, makes things easier :slight_smile:

scheduler.createUnitsView({ name: 'unit', list: units, property: 'id',
Why did you choose id as property? Scheduler uses event’s ids to differ one from each other, creating units view based on it is incorrect.

Kind regards,
Ilya

Ah yeah that was a bad bit of sample code. But in my main app I’ve got a different property and still getting the same error.

Hello,

Does sample work for you if you change ‘id’ property to ‘tid’?
Can you create same small sample for the case where it works incorrectly?

Kind regards,
Ilya