Disable dates in datePicker

Hi,

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 02:20 PM UTC

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. 
 
 
<template> 
    <div> 
        <ejs-gantt ref='gantt' :dataSource="data" id="GanttContainer"> 
            <e-columns> 
                <e-column field='StartDate' width='150' :edit='dpParams'></e-column> 
               //...  
            </e-columns> 
        </ejs-gantt> 
    </div> 
</template> 
<script> 
  return{ 
     dpParams: { params: 
      { 
        renderDayCell: function(args){ 
          if (args.date.getDay() === 0 || args.date.getDay() === 6) { 
            args.isDisabled = true; 
          } 
        } 
       } 
   }, 
}; 
</script> 
 
Please find the below sample link. 
 
Regards, 
Jesus Arockia Sankaran S 



TT Tomasz Tomczykiewicz July 15, 2019 08:47 AM UTC

Thank, it's solved my problem.

Best regards,
Tomasz Tomczykiewicz


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

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


Loader.
Up arrow icon