javascript - How do I combine input type date and input type time in one -


i have angularjs ui asks user input date , time. want combine 2 in 1 date type can send rest api. how do it?

my html code

<div class="col-md-7">      <input type="date" id="exampleinput" ng-model="uicontroller.jobdatamodel.date"       placeholder="yyyy-mm-dd" required/>  <div class="col-md-7">     <input type="time" id="exampleinput1" ng-model="uicontroller.jobdatamodel.time"      placeholder="hh:mm:ss:" required/> 

how do in controller ? should concatenate 2 ng- models?

no need add input field, can use 1 input field both date , time, here code

<html>   <head>     <title>user input</title>     <link rel="stylesheet" href="styles.css">     <script src="https://code.angularjs.org/2.0.0-beta.0/angular2-polyfills.js"></script>     <script src="https://code.angularjs.org/tools/system.js"></script>     <script src="https://code.angularjs.org/tools/typescript.js"></script>     <script src="https://code.angularjs.org/2.0.0-beta.0/rx.js"></script>     <script src="https://code.angularjs.org/2.0.0-beta.0/angular2.dev.js"></script>     <script>       system.config({         transpiler: 'typescript',          typescriptoptions: { emitdecoratormetadata: true },          packages: {'app': {defaultextension: 'ts'}}        });       system.import('app/boot')             .then(null, console.error.bind(console));     </script>   </head>    <body>     <my-app>loading... </my-app>   </body>  </html> 

you need import app/boot


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -