Allow Editing

17 Nov 20171 minute to read

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

  • CSHTML
  • <ej-date-range-picker id="DateRange" width="35%" allow-edit=true></ej-date-range-picker>

    Enable/Disable

    17 Nov 20171 minute to read

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

  • CSHTML
  • <ej-date-range-picker id="DateRange" width="35%" create=Create></ej-date-range-picker>
    
        <script>
        //Create event triggers after DateRangePicker created successfully.
            function Create() {
                $("#DateRange").ejDateRangePicker('disable');
                } 
        </script>

    Clear Ranges

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

  • CSHTML
  • <ej-date-range-picker id="DateRange" width="35%" before-close=Clear></ej-date-range-picker>
    
        <script>
        //BeforeClose event triggers before closing DateRangePicker popup
        function Clear() {
                    $("#DateRange").ejDateRangePicker('clearRanges');
                }
    
        </script>

    The following screenshot displays the output for the above code.

    BeforeClose Event of DateRangePicker