We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to disable dates before Start Date in End Date calendar on start date selection in Edit task popup

How to disable dates before Start Date in End Date calendar on start date selection in Edit task popup?


Here Start date is 3/9/2022 when i click on end date in end date calendar, dates before start date should be g


1 Reply

GM Gopinath Munusamy Syncfusion Team November 21, 2022 07:24 AM UTC

Hi Kumar,



To disable dates before the Start Date in the End Date calendar, you can use the actionComplete event with a requestType of openAddDialog or openEditDialog. Inside this event, we need to set the minimum date for the "End date" field to be equal to the start date of the task. For your reference, a sample and code snippets are attached. Check the sample and documentation links below for more details.


Code Snippets:

[App.component.ts]

 

public actionComplete(args) {

    if (args.requestType == 'openAddDialog' || args.requestType == 'openEditDialog') {

      document.getElementById("ganttDefaultEndDate").ej2_instances[0].min = args.data.StartDate;

    }

}



Sample: https://stackblitz.com/edit/angular-etywwm?file=app.component.ts%3AL33,app.component.html,app%2Fapp.module.ts



Regards,

Gopinath M


Loader.
Live Chat Icon For mobile
Up arrow icon