angularjs - How to get date and time separtely -


this question has answer here:

i'm beginner of angularjs. need half value input.

this code. i'm using datetime-picker

<input class="form-control" placeholder="choose date , time" name="datetime" value="datetime" ng-model="date3.data" datetime-picker date-format="yyyy-mm-dd hh:mm:ss" close-on-select="false" /> 

now 2016-06-29 12:14:00

i need separate date , time -like date = 2016-06-20 , time = 12:14:00

just use split method in string

t = "2016-06-29 12:14:00" var = t.split(" "); var date = a[0]; var time = a[1]; 

Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -