title: Angular2 date and time picker
body: <p>I can't seem to be able to create a proper date and time picker for my angular2 app. Can someone help me set it up?<br/></p>
  
  <p>I've tried the following techniques:<br/>
  Ng2-datetime:
  I imported it into the main app.module:</p>
  
  <pre><code>import { NKDatetimeModule } from 'ng2-datetime/ng2-datetime';
  @NgModule({
    imports: [
    NKDatetimeModule,
  ..
   ],
  </code></pre>
  
  <p>and in the template:</p>
  
  <pre><code>&lt;datetime [(ngModel)]="startDate"&gt;&lt;/datetime&gt;
  </code></pre>
  
  <p>This yields in the template not being recognizable: 'datetime' is not a known element</p>
  
  <p>My apps is composed from a few modules, each has its own app module. So when I tried taking the above definitions to the module definitions of the sub module, I get '$(...).datepicker is not a function'
  Technical details: <br/>
  I use angular-cli 2.4.8
  with the following packages:</p>
  
  <pre><code> "bootstrap-datepicker": "^1.6.4",
   "bootstrap-daterangepicker": "2.1.25",
   "bootstrap-timepicker": "^0.5.2",
   "jquery": "3.1.1",
   "moment": "2.17.1",
   "ng2-bootstrap": "1.3.3",
   "ng2-datetime": "^1.3.2",
   "ng2-datetime-picker": "^0.14.7",
  </code></pre>
  
  <p>I also tried separating it into date input and time input, using pipe to display the desired format. This doesn't show the content of the date or time.</p>
  
  <pre><code>&lt;input [type]="'date'" [model]="startDate" | date: 'MM/DD/YYYY'"&lt;/input&gt;
  </code></pre>