Is there a way to add a date picker value into a Firebase database?
Something along these lines?
$scope.AddPost = function() {
...
Published: $scope.post.Published.DATESTAMP
...
}
from a materialize datepicker value like so:
<input type="date" ng-model="post.Published" class="datepicker">
Server side code from picker:
<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">
TRIED:
$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
})
Everything loads except date.
I have been looking for an equivalent but only found the Firebase.ServerValue.TIMESTAMP
which is not what I want as I need people to be able to pick the date manually.