Datepicker reads variables from text file

Nabid

Can someone show me how to make the code below get its disabled dates variables (12-12-2017 and 9-12-2017) from a separate text file instead of from inside the script? I have tried many methods to no avail. Any help will greatly be appreciated.

Code:

<!--start datepicker -->
<script type="text/javascript">
var unavailableDates = ["12-12-2017","9-12-2017"];
function unavailable(date) {
dmy = date.getDate() + "-" + (date.getMonth() + 1) + "-" + date.getFullYear();
if ($.inArray(dmy, unavailableDates) == -1) {
    return [true, ""];
} 
else {
    return [false, "", "Unavailable"];
}
}

$(function() {
  $( "#datepicker1, #datepicker2" ).datepicker({
      dateFormat: 'mm/dd/yy', 
      beforeShowDay: unavailable,
      minDate: 2,
      });
 });
</script> 
<!--end datepicker -->
Pratyush Sharma

You can write a REST api to get the disabled dates.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Create variables from text file

From Dev

Batch command to pull variables from a text file

From Dev

Python : saving variables from a text file created

From Dev

ActionScript: loading variables from a text file into _root

From Dev

Python - sum variables from a text file

From Dev

Weird issue passing variables from text file

From Dev

Plucking variables from a text file in PHP

From Dev

Powershell script getting variables from a text file

From Dev

Powershell reading multiple variables from text file

From Dev

Python Consecutive Reads From File

From Dev

batch backup that reads number from a text file doesn't work for values below 9

From Dev

Increasing performance of clear text file reads

From Dev

Windows batch file to extract env variables from text file

From Dev

Text file reading input variables from txt file

From Dev

Logstash reads data from stdin but not from file

From Dev

Logstash reads data from stdin but not from file

From Dev

Parsing text file to variables

From Dev

echo does not evaluate variables when reading from text file

From Dev

bash while loop to explode variables from text file

From Dev

Receiving multiple variables from ajax & writing it to text file using php

From Dev

How to use bash to replace specific text from variables in a config file?

From Dev

jquery to use .get and retrieve variables from text file

From Dev

bash while loop to explode variables from text file

From Dev

Read only specific lines from text file and save matches into variables

From Dev

Reading Variables from a text file c# StringBuilder

From Dev

Reading multi-dimensional variables from text file in C#

From Dev

Assign values to C# variables by reading characters from a text file

From Dev

reading variables value from text file in batch script

From Dev

Extract variables from text file into array with Bash, Perl and Regex

Related Related

  1. 1

    Create variables from text file

  2. 2

    Batch command to pull variables from a text file

  3. 3

    Python : saving variables from a text file created

  4. 4

    ActionScript: loading variables from a text file into _root

  5. 5

    Python - sum variables from a text file

  6. 6

    Weird issue passing variables from text file

  7. 7

    Plucking variables from a text file in PHP

  8. 8

    Powershell script getting variables from a text file

  9. 9

    Powershell reading multiple variables from text file

  10. 10

    Python Consecutive Reads From File

  11. 11

    batch backup that reads number from a text file doesn't work for values below 9

  12. 12

    Increasing performance of clear text file reads

  13. 13

    Windows batch file to extract env variables from text file

  14. 14

    Text file reading input variables from txt file

  15. 15

    Logstash reads data from stdin but not from file

  16. 16

    Logstash reads data from stdin but not from file

  17. 17

    Parsing text file to variables

  18. 18

    echo does not evaluate variables when reading from text file

  19. 19

    bash while loop to explode variables from text file

  20. 20

    Receiving multiple variables from ajax & writing it to text file using php

  21. 21

    How to use bash to replace specific text from variables in a config file?

  22. 22

    jquery to use .get and retrieve variables from text file

  23. 23

    bash while loop to explode variables from text file

  24. 24

    Read only specific lines from text file and save matches into variables

  25. 25

    Reading Variables from a text file c# StringBuilder

  26. 26

    Reading multi-dimensional variables from text file in C#

  27. 27

    Assign values to C# variables by reading characters from a text file

  28. 28

    reading variables value from text file in batch script

  29. 29

    Extract variables from text file into array with Bash, Perl and Regex

HotTag

Archive