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

Disable dates in datePicker


Could you disable dates in datePicker when you edit dates in cell mode?

Best regards,
Tomasz Tomczykiewicz

3 Replies

JA Jesus Arockia Sankaran S Syncfusion Team July 12, 2019 09:20 AM

Hi Tomasz, 
We can disable dates in the datePicker component by using renderDayCell client-side event in the Gantt column edit inner property. In the given sample, we have disabled weekend dates. 
Please find the code example below. 
        <ejs-gantt ref='gantt' :dataSource="data" id="GanttContainer"> 
                <e-column field='StartDate' width='150' :edit='dpParams'></e-column> 
     dpParams: { params: 
        renderDayCell: function(args){ 
          if (args.date.getDay() === 0 || args.date.getDay() === 6) { 
            args.isDisabled = true; 
Please find the below sample link. 
Jesus Arockia Sankaran S 

TT Tomasz Tomczykiewicz July 15, 2019 03:47 AM

Thank, it's solved my problem.

Best regards,
Tomasz Tomczykiewicz

JA Jesus Arockia Sankaran S Syncfusion Team July 15, 2019 06:25 AM

Hi Tomasz, 
Thanks for your update. 
Jesus Arockia Sankaran S 

Live Chat Icon For mobile
Up arrow icon