title: Show current date in correct format in angular 2
body: <p>I want to show current date in correct format 
  Example is: 12/19/2016.
  Now i am using Date.now(). But it show garbage value, I want to show only date.
  I am also using pipes but pipes are not bind with database. Now i am using formcontrol, which get the current date using Date.now(). and later i must show this date in grid in html. 
  My current code is.
  Date.js file:</p>
  
  <pre><code>var mongoose = require('mongoose');
  var Schema = mongoose.Schema,
  ObjectId = Schema.ObjectId;
  
  PurchaseOrderSchema = new Schema({
     PurchaseOrderNo: {
      type: Number,
      required: true,
      index: {
      unique: true
      }
     },
     Status:String,
     OrderDate: {
      type: Date,
      "default": Date.now()
    }
  
  }
  
  
  { collection: 'PurchaseOrder' });
  
  PurchaseOrderSchema.set('toObject', { getters: true });
  PurchaseOrderSchema.set('toJSON', { getters: true });
  
  PurchaseOrderSchema.virtual('locationname').get(function() {  
      return this.Locations[0].ParentId.LocationName;
  });
  PurchaseOrderSchema.virtual('Tempvendor').get(function() {  
      return this.Vendors[0].ParentId.VendorName;
  });
  
  
  PurchaseOrderSchema.statics.delete_by_name = function(name, cb_succ, cb_fail) {};
  var PurchaseOrder = mongoose.model('PurchaseOrder', PurchaseOrderSchema);
  
  module.exports = PurchaseOrder;
  
  newpurchaseorder.ts file:
  export class NewPurchaseOrderComponent implements OnInit {
    private PurchaseOrderNo = new FormControl("", Validators.required);  
  private OrderDate = new FormControl("");
     this.OrderDate=Date.now();
   ngOnInit() {
  
      this.addClassForm = this.formBuilder.group({
              PurchaseOrderNo:this.PurchaseOrderNo,
              OrderDate: this.OrderDate,
  
              });
   }
  }
  
  newpurchageorder.html file:
  &lt;section class="page-form-ele page"&gt;
    &lt;section class="panel panel-default"&gt;
      &lt;div class="panel-heading"&gt;&lt;span class="glyphicon glyphicon-th"&gt;&lt;/span&gt;Purchase Order&lt;/div&gt;
      &lt;div class="panel-body" data-ng-controller="TabsDemoCtrl"&gt;
        &lt;div class="row"&gt;
          &lt;div class="col-sm-12"&gt;
            &lt;div class="heading-container"&gt;
              &lt;div class="row"&gt;
                &lt;div class="col-sm-6 margin-top-13"&gt;
                  &lt;h3 class="h3-color"&gt;New Purchase Order&lt;/h3&gt;
                &lt;/div&gt;
                &lt;div class="col-sm-6" align="right"&gt;
  
                  &lt;form class="form-horizontal margin-bottom-0 margin-top-6" [formGroup]="addClassForm" (ngSubmit)="submitAdd()" role="form"&gt;
  &lt;div class="form-group"&gt;
    &lt;label for="inputEmail3" class="col-sm-2 control-label"&gt;Date:&lt;/label&gt;
                            &lt;div class="col-sm-4"&gt;
                              &lt;input type="number" class="form-control" [(ngModel)]="OrderDate"  id="orderdate" placeholder="Order Date..." formControlName="OrderDate" required readonly="true" &gt;
                            &lt;/div&gt;
    &lt;/div&gt;                     
  
                          &lt;/div&gt;
  &lt;/div&gt;
  &lt;/form&gt;
  &lt;/section&gt;
  </code></pre>