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; } });
Comments
Post a Comment