search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Trying to update resource row using timerange selected

Asked by Adrian
1 year ago.

Hi,

I'm using the following command to try and push a disabled time range into the disabled field within the resources properties and call update, however I'm running into and issue which is giving me an uncaught error:

Uncaught TypeError: Cannot read properties of undefined (reading 'parent')

Function in use:

dp.onTimeRangeSelected = function(args) {

        var row = dp.rows.find(args.resource);
        row.data.disabled.push({start: args.start['value'], end: args.end['value']});
        dp.rows.update(row);
        //console.log(row)
}

I was following the example provided in this documentation, however I still get the same error when I call update.
https://api.daypilot.org/daypilot-scheduler-rows-update/

Any clue on why calling dp.rows.update(row) returns the error above?

Answer posted by Dan Letecky [DayPilot]
1 year ago.

This error has been fixed in version 2022.3.5391:
https://javascript.daypilot.org/daypilot-pro-for-javascript-2022-3-5391/

Please let me know if the problem persists.

Comment posted by Adrian
1 year ago.

Yep that resolved it, thanks.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.