I want to filter the selected dates on a datepicker. Basically, I have to filter by weekdays - i.e. Make weekends and weekends inaccessible.
I know that you can specify dates using a function in beforeShowDate: and you can also use $ .datepicker.noWeekends.
Question: can you do both?
$. datepicker.noWeekends is a pretty simple bit of code:
function (date) { var day = date.getDay(); return [day > 0 && day < 6, ""]; }
Since you will need to write a function for the holidays, you can simply include this logic in this function.
Can you do the opposite and indicate which dates you can choose and leave everything else filtered?
, .
. , , - :
onlyMondays: function(date){ var day = date.getDay(); return [(day == 1), ""] }
Source: https://habr.com/ru/post/1698767/More articles:How to enable WPF control animation before deleting from visual tree - controlsСоздание SQL-скриптов для SQL Server с использованием студии управления SQL - sql-serverAdded code, swf size ... less? - compiler-constructionWhat is better for coding HTML for RSS? - phpHow to set the initial size of QScrollArea? - c ++Vista Office Interop not working - c #Configuring a backup database server in an ASP.NET web.config file - sql-serverURL Based Authentication Link - securityHow to change the format of substitution variables in a template - unixCan I target an item before it is closed? - javascriptAll Articles