Select other dates even there are disabled date in the middle of desired dates
See original GitHub issueIs it possible to select dates between a disabled date? I tried to disable a specific date. e.g. (2018-08-17). I still want to select dates from 2018-08-16 to 2018-08-18.
function pad(number, length) {
var str = '' + number;
while (str.length < length) {
str = '0' + str;
}
return str;
}
beforeShowDay: function(t)
{
$dates = '2018-08-17';
$calendar_date = t.getFullYear()+"-"+(pad(t.getMonth()+1, 2))+"-"+pad(t.getDate(), 2);
var valid = !($calendar_date == $dates);
var _class = valid ? '' : 'invalid';
var _tooltip = valid ? '' : 'This is already taken.';
return [valid,_class,_tooltip];
},
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
How to remove disabled date count in datepicker
I'm trying to get date count amount within these days selection. Usually I get date count correctly. But when I select date range...
Read more >How to disable days from being selected on the Date/Time ...
I think this is why it appears that those dates can't be clicked- because after you click one that you aren't "allowed" to,...
Read more >Disable some Date in the Rad date Picker - Telerik
My purpose is to disable all the dates other than a particular range of dates. I know I can use Min and Max...
Read more >Possible to select a disabled date with the keyboard #723
Possible to select a disabled date with the keyboard #723 ... Disabled dates still accessible using keyboard or manually entered dates #582.
Read more >AD disabled date - Microsoft Q&A
AD disabled date. Is there a user attribute anywhere in AD which captures the date and time an account was disabled? Or any...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@windchime18 thanks for the screenshot, that helps understanding your case! Indeed, I think by default this is not supported.
When looking at example#26 at https://longbill.github.io/jquery-date-range-picker/ this does also not work by default.
But it seems it is possible, please see this comment https://github.com/longbill/jquery-date-range-picker/issues/352#issuecomment-351705025, it refers to this example: https://jsfiddle.net/maximelafarie/dnbd01do/21/
In that example the Sundays are disabled, but I can easily select a range from Friday to Monday…
Does this help you?
Credits go to @maximelafarie !
Maybe this functionality can be adopted in the library, a Pull Request would be welcome.