Disable specific dates in jquery -
I'm using the jquery date picker found here: which lets the user choose a start and end date.
Although I want to be able to disable specific dates
I tried to apply the code found here: which discusses disabling national holidays.
This is my complete code:
$ (function () {$ ('date-pick'). DatePicker (before {ShowDay: nationalDays}) // $ ("Selector") Datepicker ({ShowDay: nationalDays before}) [5, 25, [4, 27, 'za'] [5, 17, 'Nu'], [3, 17, 'or'], [5, 25, 9, 7, 'BR'], [10, 1, 6, 6, 'from'], [7, 4, 'we'], [8, 17, 'id'], [ 9, 7] 'CN'], [11, 22, 'LB'], [12, 12, 'K']]; For national day (function) (i (i = i; i & lt; natDays Length; i ++) {if (Date.getMonth () == natDays [i] [0] - 1 and amp; amp; date.getDate () == natDays [i] [1]) {Return [wrong, net day [i] [2] + 'day'];}} return [true, ''];} $ ('# start-date'). Bind ('DPClosed', function (E, selecteddates) {var d = selected date [0]; if (d) {d = new date (d);. $ ('# End date') dpSetStartDate (d.addDays (1) .asString ( Bind ('dpClosed', function (E, selected datas) {var d = selectedDates [0]; if (d) {d = new date (d) ; $ ('# Start-date'). DpSetEndDate (d.addDays (-1) .asString ());}}); });
But it does not seem to work.
I appreciate any help with this solution!
Is there a built-in capability of that type? Can you switch?
Comments
Post a Comment