• Resolved x2creativos

    (@x2creativos)


    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]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Fahad Mahmood

    (@fahadmahmood)

    @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.

    Thread Starter x2creativos

    (@x2creativos)

    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.

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

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

    Thread Starter x2creativos

    (@x2creativos)

    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.

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Disable a week’ is closed to new replies.