【发布时间】:2015-05-27 17:13:12
【问题描述】:
我正在使用 ionicframework 构建具有 Angular 的混合应用程序。
我有一个带有两个输入框的表单:日期和时间。日期输入的值在数据库中保存为:
Tue Mar 24 2015 00:00:00 GMT 0300 (AST) 在我的 android 设备上运行表单时,我得到了这种类型的数据,但我想将日期保存为简单的:24-04-2015
我尝试了什么
form.html
<form>
<input ng-model="app.date" class="positive" type="date">
<input ng-model="app.time" class="positive" type="time">
<button ng-click="makeApp(app)">send</button>
</form>
controller.js
$scope.makeApp = function (app) {
$http.post("http://www.foo.com/senddata.php?date="+app.date+"&time="+app.time)
.success(function(data){
});
【问题讨论】:
标签: angularjs html date time ionic-framework