dmilosavleski

4 - 2

Dec 25th, 2017
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Лаб04 Зад02</title>
  6. <link type="text/css" href="jquery/jquery-ui.css"rel="stylesheet" />
  7. <script src="jquery/jquery.js"></script>
  8. <script src="jquery/jquery-ui.js"></script>
  9.  
  10. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
  11. <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script><link rel="stylesheet"
  12. href="http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
  13. <script src="http://code.jquery.com/jquery-1.10.2.js"></script>
  14. <script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
  15.  
  16. <script>
  17. $(document).ready(function() {
  18. $("#date").datepicker({
  19. defaultDate: new Date(),
  20.  
  21. beforeShowDay: function(date) {
  22. var disabled = true,
  23. numOfDays = new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate();
  24. if (numOfDays % 2 == 0)
  25. disabled = (date.getDate() % 2 != 0)
  26. else disabled = (date.getDate() % 2 == 0)
  27. return [disabled, ""]
  28. }
  29. });
  30. });
  31. </script>
  32.  
  33. </head>
  34.  
  35. <body>
  36. <label>Date: </label> <input id="date"><br />
  37. </body>
  38.  
  39. </html>
Add Comment
Please, Sign In to add comment