Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>When including outside libraries with AngularJS you often need to wrap them in directives in order for two-way data binding &amp; DOM events to work correctly. Docs link: <a href="http://docs.angularjs.org/guide/directive" rel="nofollow">AngularJS Directives</a></p> <p>Many elements from Twitter Bootstrap and jQuery UI have already been conveniently wrapped up for you by a group of folks over at AngularUI, you can find them here: <a href="http://angular-ui.github.com/" rel="nofollow">http://angular-ui.github.com/</a>.</p> <p>Here's the source code for the date directive: <a href="https://github.com/angular-ui/angular-ui/blob/master/modules/directives/date/date.js" rel="nofollow">https://github.com/angular-ui/angular-ui/blob/master/modules/directives/date/date.js</a>, AngularJS will execute the code within the <code>link</code> function after it has loaded the directive, which is where the usual datepicker event listeners are attached.</p> <p>Below is some example code of how a Twitter Bootstrap form + datepicker input might look with AngularUI, where the attribute <code>data-ui-date</code> is what indicates to the AngularJS compilation process that this element is a directive. You could also leave off the <code>data</code> part and just have the attribute as <code>ui-date</code>. </p> <pre><code> &lt;div class="control-group"&gt; &lt;label class="control-label"&gt;Start Date&lt;/label&gt; &lt;div class="controls"&gt; &lt;input data-ng-model="round.start_date" data-ui-date="dateOptions" name="datepicker" type="text" class="input-medium" placeholder=""&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p><code>dateOptions</code> is just a scope value set somewhere in a controller or in the directive, like so:</p> <pre><code> $scope.dateOptions = { changeYear: false, changeMonth: false, nextText: '&lt;i class=icon-arrow-right&gt;&lt;/i&gt;', prevText: '&lt;i class=icon-arrow-left&gt;&lt;/i&gt;', dateFormat: 'yy-mm-dd' }; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload