Custom Form throws scheduler._lame_copy error

I am trying to create a custom form, everything works until I hit save. I get an error in dhtmlxscheduler.js line 127 in scheduler._lame_copy because a is undefined. When I change dhtmlxscheduler.js it never gets my changes…driving me crazy right now. Any help would be greatly appreciated.

Could you provide more details about your code?
Especially about the mentionned methods: … _form.html