javascript - Disable past dates and enable only certain future dates in datepicker -


i attempting use jquery datepicker, wish disable past days , allow future thursdays. can allow thursdays, mindate functionality add doesn't work it. code:

<script>  jquery(document).ready(function() {     jquery('#input_40_4').datepicker({         beforeshowday: function(date) { return [date.getday() == 4, ""];}    }); });  $(function () {     $("#input_40_4'").datepicker({ mindate: 0 }); });  </script> 

can explain why these don't work together?

you can add more options datepicker separating them commas.

$(document).ready(function() {     $('#input_40_4').datepicker({         beforeshowday: function(date) { return [date.getday() == 4, ""];},         mindate : 0         // can add more options here well, seperate them commas    }); }); 

the reason why didn't work in question because overwrite options datepicker created in function on line 10 options datepicker in documentready section.

you saying create new datepicker mindate:0, never mind create new 1 tuesdays.


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -