Our pure JavaScript Scheduler component


Post by sterh »

I want to create dependencies between some events, but another events (depends on their data) should be disabled for dependencies.

Can you help me? Did not find any examples for this functionality. If you provide me some example how to set or use validator to allow or prevent creating the dependency, it would be good.

I tried to use "onDependencyValidationStart" event, so maybe the code should be here, but I can not update "allowCreate" property for dependencies dynamically.


Post by tasnim »

Try using beforeDependencyCreateFinalize.
Docs : https://bryntum.com/docs/scheduler-pro/api/Scheduler/feature/mixin/DependencyCreation#event-beforeDependencyCreateFinalize

Here is an example :

listeners : {
	beforeDependencyCreateFinalize() {
		if (condition) {
			// It will prevent dependency creation
			return false;
		}
	}
}

Post by sterh »

Thank you! Found the same solution but thought about something that prevents active css styles too for disabled events.
Anyway it works.

Thank you for quick answer =)


Post Reply