日付ピッカーの値を Firebase データベースに追加する方法はありますか?
これらの線に沿った何か?
$scope.AddPost = function() {
...
Published: $scope.post.Published.DATESTAMP
...
}
次のようなマテリアライズdatepicker値から:
<input type="date" ng-model="post.Published" class="datepicker">
ピッカーからのサーバー側コード:
<input type="text" ng-model="post.Published" class="datepicker ng-pristine ng-valid picker__input ng-touched picker__input--active picker__input--target" readonly="" id="P2078770150" tabindex="-1" aria-haspopup="true" aria-expanded="true" aria-readonly="false" aria-owns="P2078770150_root">
試した:
$scope.AddPost = function() {
myPosts.$add({
Title: $scope.post.Title,
Intro: $scope.post.Intro,
Body: $scope.post.Body,
Published: $scope.post.Published,
Author:$scope.post.Author
})
日付を除くすべてがロードされます。
私は同等のものを探していましたが、Firebase.ServerValue.TIMESTAMP
人々が手動で日付を選択できるようにする必要があるため、私が望むものではないものしか見つかりませんでした.