Formatting date in HTML side with angular 2 -


need formatted date. following code not working , both date , time viewed. (need view date part)

 <div class="form-group">                       <input formcontrolname="startdate" type="date:'dd/mm/yyyy'" class="form-control" >  </div>   

when type assigned type="date", not bind value patched (set) .

here working plunker links both reactive template driven forms

reactive & template

for reactive

 <div class="form-group" formgroupname="address">       <label for="">date</label>       <input type="date" class="form-control" formcontrolname="date">     </div> 

for template driven

  <div class="form-group">     <label for="date">date</label>     <input type="date" class="form-control" ng-control="date" placeholder="date" required>   </div> 

Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -