WPIntell

Source evidence

Disable a week

WP Datepicker · support · 2022-06-22T16:53:00+00:00

mixedsentiment
mediumseverity
0.78relevance
5replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

7 / 29 rows with source links

24.1% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

22 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
x2creativos resolved
In my Datepicker Pro I have disabled all Mondays with the following code: function (date) { var day = date.getDay(); return [(day != 1)]; } But now I need to disable also a specific week. I don’t know how to do it. In the plugin settings I select “Disable a specific set of dates”, but nothing happens. I can’t find any code to work with it. The page I need help with: [ log in to see the link] @x2creativos it might will require some custom script. Please check the help tab on settings page and use the contact option so developer can help you better in custom requirements. Sorry, I’m not a Skype user. Also live support wouldn’t help much because I don’t speak English well. Spanish only. The thing is, I have the right code to disable every Monday: function (date) { var day = date.getDay(); return [(day != 0 && day != 1)]; } And I also have the right code to disable the week I want to disable: function (date) { var array = ["2022-06-27","2022-06-28","2022-06-29","2022-06-30","2022-07-01","2022-07-02","2022-07-03"]; var string = jQuery.datepicker.formatDate("yy-mm-dd", date); return [ array.indexOf(string) == -1 ]; How do I merge these two codes into one to make it work? Thank you. Kindly use stackoverflow type help forums for custom requirements, this support thread is about the bug reports for the plugin hostes on WordPress.org. As you are talking about a new use case, so it is not a bug report. I appreciate your patience. The problem that I did not see any code when selecting “Disable a specific set of dates” is because I was using version 15.5 of the Safari browser. I have tried with Firefox and it works fine. Usually this issue appears when we use input type date instead of input type text. Chrome browser also reacts for input type date.

Comments

5 shown
Fahad Mahmood 2022-06-22T17:54:00+00:00

@x2creativos it might will require some custom script. Please check the help tab on settings page and use the contact option so developer can help you better in custom requirements.

x2creativos 2022-06-23T09:38:00+00:00

Sorry, I’m not a Skype user. Also live support wouldn’t help much because I don’t speak English well. Spanish only. The thing is, I have the right code to disable every Monday: function (date) { var day = date.getDay(); return [(day != 0 && day != 1)]; } And I also have the right code to disable the week I want to disable: function (date) { var array = ["2022-06-27","2022-06-28","2022-06-29","2022-06-30","2022-07-01","2022-07-02","2022-07-03"]; var string = jQuery.datepicker.formatDate("yy-mm-dd", date); return [ array.indexOf(string) == -1 ]; How do I merge these two codes into one to make it work? Thank you.

Fahad Mahmood 2022-06-23T09:53:00+00:00

Kindly use stackoverflow type help forums for custom requirements, this support thread is about the bug reports for the plugin hostes on WordPress.org. As you are talking about a new use case, so it is not a bug report. I appreciate your patience.

x2creativos 2022-06-23T09:56:00+00:00

The problem that I did not see any code when selecting “Disable a specific set of dates” is because I was using version 15.5 of the Safari browser. I have tried with Firefox and it works fine.

Fahad Mahmood 2022-06-23T09:58:00+00:00

Usually this issue appears when we use input type date instead of input type text. Chrome browser also reacts for input type date.