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 set mindate in DateRangePicker

I learn about this below this link https://help.syncfusion.com/api/js/ejdaterangepicker but it not working.

$('[id*="drp"]').ejDateRangePicker({

endDate: new Date("8/9/2017")

});

I testing with minDate nothing

For create DataRangePicker I use asp:TextBox


1 Reply

BC Berly Christopher Syncfusion Team August 10, 2017 05:41 PM UTC

Hi Tomasz, 

Thanks for contacting Syncfusion support. 
Query 1: 
$('[id*="drp"]').ejDateRangePicker({ 
endDate: new Date("8/9/2017") 
}); 
For create DataRangePicker I use asp:TextBox 
Answer: 
we would like to let you know that “endDate” specifies the end date of the selected daterange and “startDate” specifies the start date of the selected daterange. And, please specify the endDate after the startDate is defined. Please make use of below code to create the DateRangePicker with startDate and endDate. 
Default.aspx: 
 
<asp:TextBox ID="date" runat="server"></asp:TextBox> 
     <script> 
    $('[id*="date"]').ejDateRangePicker({ 
      startDate:new Date("1/1/2017"), 
      endDate: new Date("1/10/2017") 
 
}); 
  </script> 

For your convenience, we have prepared the sample. Please get the sample from the below location. 

  
Query 2: 
I testing with minDate nothing.  
Answer: 
Currently, we don’t have an option to select minDate and maxdate for DateRangePicker. So, we have already logged this as a feature request in our database (“Add a min and maxdate in DateRangePicker”) and it will be included anyone of our upcoming release. 

If still you are facing issues please get back to us with more details that will help us to provide exact solution. 
  
Regards, 
Berly B.C

Loader.
Live Chat Icon For mobile
Up arrow icon