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

Parent resource id (Vue Scheduler)

Asked by Hardik
1 year ago.

want to get parent resource id on event move ,
is there is any way to achieve that ?
Used this
var parentId = dp.rows.find("A").parent().id;
but not get anything and also don't have idea what use in vue js for dp ?

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

The "dp" variable used in example is a reference to DayPilot.Scheduler object.

In Vue, you can get it using the "ref" attribute:
  <DayPilotScheduler id="dp" :config="config" ref="scheduler"/>

import {DayPilot, DayPilotScheduler} from 'daypilot-pro-vue'
import {onMounted, reactive, ref} from 'vue';

export default {
  components: {
  setup() {
    const scheduler = ref(null);
    const config = reactive({
      timeHeaders: [{groupBy: "Month"}, {groupBy: "Day", format: "d"}],
      scale: "Day",
      // ...

    onMounted(() => {

    return {

To call the rows.find() method, use the "scheduler" constant:

const parentId = scheduler.value.control.rows.find("A").parent().id;

See also:

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