What is the method for invoking a function with a chosen date in the @syncfusion schedule with Angular 9?

capture of calendar display

I am looking for a way to trigger a function with the selected date as a parameter. However, I am unable to locate the appropriate event to use within this module. Can someone provide assistance with this issue? Thanks!

Answer №1

Hello Valued Customer,

Warm greetings from Syncfusion.

If you are looking to implement the feature of "Binding change event in schedule calendar," you can achieve this using the created event of our scheduler component.

To help you get started, we have prepared a sample for your reference. You can access the sample through the following link:

Sample: https://stackblitz.com/edit/schedule-calendar-change-event-binding

onCreated(args): void {
  (this.scheduleObj.element.querySelectorAll('.e-schedule-toolbar .e-date-range')[0] as any).click();
  var calendar = (this.scheduleObj.element.querySelectorAll('.e-header-calendar')[0] as any).ej2_instances[0];
  calendar.change = function(args){
    // Add your custom code here
    console.log(args);
    alert('Date changed');
  }
  calendar.start = "Month";
  (this.scheduleObj.element.querySelectorAll('.e-schedule-toolbar .e-date-range')[0] as any).click();
}

For more detailed information, you can refer to our API documentation using the following link:

API link:

We encourage you to try out the provided sample and reach out to us if you require any further assistance.

Best Regards,

Vinitha

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Determine the value from an object in the view by evaluating a string in dot notation

Seeking assistance with a recurring issue I've encountered lately. Imagine having two objects in AngularJS: $scope.fields = ['info.name', 'info.category', 'rate.health'] $scope.rows = [{ info: { name: "Apple", cate ...

I'm receiving a TypeError in Nodejs indicating that the hashPassword function is not recognized as a function. Can anyone offer advice on how to

How's everything going? I could really use your assistance! I'm currently working on developing an API for registering authenticated users, with data storage in the MongoDB Atlas database (cloud). Unfortunately, I've run into a troubling er ...

Changing setState in React does not update the current state

My challenge lies in altering the value of a TreeSelect component from the antd (antdesign) UI library. I followed their instructions outlined in their documentation, with the only divergence being the use of Typescript. The issue I encounter is with ch ...

Tips on updating time zone settings in a browser using React JS or JavaScript

I am currently facing a requirement where I need to adjust the application's time based on an environment variable. The entire application should operate using the timezone specified in the configuration file. For instance, if the designated timezone ...

Need assistance with debugging the current solution for the todo App using Commander or considering a different approach with Readline and Event Emitter?

I'm currently working on developing a CLI for a Node.js exclusive todo application using the commander and conf modules within Node.js, along with chalk to add color to the output. I've encountered some issues that I'm unsure how to resolve: ...

Exploring the implementation of if/else statements in Sass/HTML

I need assistance with customizing the appearance of a save button on my form. The button is currently disabled and appears in blue color, but I would like it to change to a different color until all fields within the form are completed. Even though it c ...

Looking for the final entry in a table using AngularJS

Hey everyone, I'm dealing with a table row situation here <tbody> <tr *ngFor="let data of List | paginate : { itemsPerPage: 10, currentPage: p }; let i = index"> <td>{{ d ...

Different ways to categorize and tally a collection of objects

I'm having trouble reshaping my data in order to create a stacked bar graph. The data from the backend is structured like this: [ {date: 'January', category: 'A'}, {date: 'January', category: 'B'}, ...

Connecting a controller to a directive in AngularJS: A step-by-step guide

Imagine a scenario with the following HTML structure: <div ng-app="testApp"> <div ng-controller="controller1"> {{controller1}} </div> <div ng-controller="controller2"> {{controller2}} </div> ...

Angular 6 issue: Data not found in MatTableDataSource

Working on implementing the MatTableDataSource to utilize the full functionality of the Material Data-Table, but encountering issues. Data is fetched from an API, stored in an object, and then used to create a new MatTableDataSource. However, no data is b ...

Unleashing the power of plugins and custom configurations in your next.js next.config.js

const optimizeNext = require('next-compose-plugins'); const imageOptimization = require('next-optimized-images'); const config = { target: 'serverless', }; module.exports = optimizeNext([imageOptimization], config); tra ...

using recursion within callback functions

In my JavaScript function with a callback, I am utilizing the "listTables" method of DynamoDB. This method returns only 100 table names initially. If there are more tables, it provides another field called "LastEvaluatedTableName", which can be used in a n ...

Activate the download upon clicking in Angular 2

One situation is the following where an icon has a click event <md-list-item *ngFor="let history of exportHistory"> <md-icon (click)="onDownloadClick(history)" md-list-avatar>file_download</md-icon> <a md-line> ...

Utilize the Multer file upload feature by integrating it into its own dedicated controller function

In my Express application, I decided to keep my routes.js file organized by creating a separate UploadController. Here's what it looks like: // UploadController.js const multer = require('multer') const storage = multer.diskStorage({ dest ...

Implementing a messaging feature with inbox functionality in a Node.js web application

In my node.js application, I am looking to incorporate a send message and inbox feature. The website focuses on job postings within a forum, catering to freelancers, mentors, and clients. To facilitate communication between these three types of users, I ...

The operation failed because the property 'dasherize' is inaccessible on an undefined object

While attempting to execute the following command: ng generate component <component-name> An error occurred saying: Error: Cannot read property 'dasherize' of undefined Cannot read property 'dasherize' of undefined The confi ...

Does the downloading of images get affected when the CSS file has the disabled attribute?

Is it possible to delay the download of images on a website by setting the stylesheet to 'disabled'? For example: <link id="imagesCSS" rel="stylesheet" type="text/css" href="images.css" disabled> My idea is to enable the link later to tri ...

How come I am able to reference a component in styled-components while others cannot?

When using styled-components, you can reference another React component using the syntax ${Label}. However, I have noticed that it only works with certain components and not others. Despite reading the documentation at , I encountered an issue when trying ...

Errors may occur when utilizing TypeScript with the Context Provider API in React

I am in the process of developing a theme changer feature and I want to save the color chosen by the user in the context. However, when I try to pass data to the value prop of the Context.Provider, I encounter an error message TS2739: Type 'Readonly&l ...

Add information to the database using JavaScript within the ASP.NET C# framework. Once the data has been successfully inserted into the database, I aim to display an alert

Is it possible to use JavaScript to insert data into a database in an ASP.NET C# environment? If so, after successfully inserting the data, how can an alert box be created? ...