Miscellaneous

Enable / Disable

The control can be enabled / disabled using public methods, enable or disable.

  • html
  • <ej:DateRangePicker ID="dateRange" runat="server"></ej:DateRangePicker>
  • js
  • // Disable the dateRangePicker.
    
            $('#<%=dateRange.ClientID%>').ejDateRangePicker('disable');
    
    
       // Enable the dateRangePicker.
    
           $('#<%=dateRange.ClientID%>').ejDateRangePicker('enable');

    Allow Editing

    Editing in input box can be disabled by setting the false value to AllowEdit API. By default this will be false and we can edit the value in input box

  • html
  • <ej:DateRangePicker ID="dateRange" runat="server" AllowEdit="false"></ej:DateRangePicker>

    Clear ranges

    To clear the all selection and ranges in a popup we can make use of clearRanges method.

  • html
  • <ej:DateRangePicker ID="dateRange" runat="server"></ej:DateRangePicker>
  • js
  • $('#<%=dateRange.ClientID%>').ejDateRangePicker('clearRanges');