jqueryUI datepicker not showing within ng-if directive of angularjs <p>I have a sample <a href="https://jsfiddle.net/mpsbhat/qx9sxo8w/4/" rel="nofollow">here</a> where date picker is defined as </p> <pre><code>&lt;div ng-if="show_d"&gt; &lt;input id="date2" type="text" ng-model="date2"&gt; &lt;/div&gt; </code></pre> <p>which is not fires the datepicker if that field is put inside <code>ng-if</code> directive.</p>