longbill / jquery-date-range-picker

A jQuery plugin that allows user to select a date range
MIT License
1.12k stars 579 forks source link

Add disableSelect() method #495

Closed SeunghyeonYoo closed 3 years ago

SeunghyeonYoo commented 4 years ago

To make the datepicker Read-Only state, added disableSelect() method. State of the datepicker is distinguished by internal 'selectable' flag

For example:

$(dom).data('dateRangePicker').disableSelect();
monovertex commented 3 years ago

You can already implement the disabled behavior by using beforeShowDay and returning false. At a first glance I don't think further support is necessary and I am wary of adding extra functionality unless absolutely necessary.

I will be closing this PR, feel free to continue the discussion here if you feel that my solution is not enough. JSFiddle and screenshot examples are also welcomed.