javascript - Open datepicker on condition -


i want datepicker open under condition, in case presence of class, here's not working code:

$('.ui-datepicker-trigger').click(function(e){     if ($(this).hasclass('disabledatepicker')) {         e.preventdefault();     } }); 

thanks!

this should work

$("input").datepicker({           beforeshow: function(a,b){               if ($(this).hasclass('disabledatepicker')) return false;            }  }); 

http://jsfiddle.net/sctwm/2/


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -