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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Min/Max date for datepicker

Thread ID:





128059 Dec 29,2016 06:08 AM UTC Jan 2,2017 12:31 PM UTC ASP.NET MVC 1
Tags: Gantt
Kuntal Patel
Asked On December 29, 2016 06:08 AM UTC


I want to restrict date selections to some range in Gantt. e.g. Start date and end date should be between a defined range. It will be fine if it can be set during Gantt initialization or at the time of editing the date fields.

How to set min/max dates for date picker at the time of editing the Gantt?

Suriyaprasanth Ravikumar [Syncfusion]
Replied On January 2, 2017 12:31 PM UTC

Hi Kuntal, 
Thanks for contacting Syncfusion support. 
We can set the maximum and minimum date to start date and end date column in Gantt by add editParams property to these columns. 
We have added minDate and maxDate value in editparams  of  start date and end date columns in “Load” client side event. 
Please find the code snippet below. 
.ClientSideEvents(eve => 
function load() { 
                var column = this.getColumns(); 
                for (var index = 0; index < column.length; index++) { 
                    if (column[index].editType === "datepicker") { 
                        column[index].editParams = { minDate: "02/23/2014", maxDate: "03/30/2014" }; 
We have also prepared the sample for your reference, please find the sample from below location.  
Disclaimer: We have removed bin and obj folder in the given sample for some security reasons, 
we must include Syncfusion.EJ and Syncfusion.EJ.MVC dlls to render the Gantt control which is available in Essential studio installed location. 
Please let us know if you require further assistance on this. 
Suriyaprasanth R. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon