Bug with datetime and dependent
Bug with datetime and dependent
Loren Maxwell
Posts: 488Questions: 120Answers: 10
in Bug reports
(I still haven't mastered making an example with Editor
)
When I use a datetime and have a dependent on it:
.dependent('datetime_field', function (val, data, callback, e) {
console.log('Do something here')
return true
})
I always get this error when the Editor initially opens:
Uncaught TypeError: Cannot read properties of undefined (reading 'length')
It goes away after that first time even if I open the Editor again.
I haven't tested it otherwise, but I'm opening the Editor with e-edit:
editor.edit( row, opts);
Answers
Best bet for Editor is to start with this template for local editing.
I'm not actually getting an error when using your dependent call: example. Did I miss something?
Allan
Thanks, @allan -- I've bookmarked the template for the future!
And hmmm... I'll dig through my code then. I must have something else that triggers that, but I thought I had already eliminated everything else.
I'll troubleshoot more and report back if needed!
As always, thanks for the excellent support!
What's the backtrace from the error?
Allan