Jquery DatePicker Change with dropdown -


I have a dropdown and JQuery UI Date Picker Consider two values ​​of dropdown are Sunday and Monday. If I choose Sunday in the dropdown, then I want to disable Calendar on all Sundays. If I choose Monday in the dropdown, I want to enable Sunday and disable it on Monday in Detector. When the page loads for the first time, it works fine but when I change the dropdown value, the date picker's value is not changing, it still disables the old values.

Do you want it?

Javascript:

  $ (document) .ready (function () {$ ("# datepicker") datepicker ({inline: true, numberOfMonths: 2, hideIfNoPrevNext: True, first show: function (date) {var val = parseInt ($ ('# temp'). Val ()); var day = date.getDay (); console.log Returns (day, val) [val == Day: False: true]}, altField: '#alternate',});});   

HTML:

  & lt; Select ID = "Temporary" & gt; & Lt; Option value = 1> Monday & lt; / Options & gt; & Lt; Option value = 0> Sunday & lt; / Options & gt; & Lt; / Select & gt; & Lt; Input type = "text" id = "datepicker" />    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -