thanks guys, but still a problem i think, or its normal to deal the date 
before it get displayed/sent?

for example, this date should get filled from the Database ISODate


<input type="date" ng-model="person.created" class="form-control"/>

and my json come in like this: *Person { 
......., "created":"2014-07-19T00:29:09-0300", .... }*, but the ng-model on 
the date stay empty


and when i want to send the date to the server, if i select the 10/10/2014 
(dd/MM/yyyy)

it send the data in this way: *"2014-10-10T03:00:00.000Z"*

and my Controller/DateGson converter its setted to work in this format: *new 
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");*


so how to make the date input to display the date in this 
*"yyyy-MM-dd'T'HH:mm:ssZ" 
*format (i just need the day, month and year) and send the edited date in 
this way to?

i got it working 
using moment($scope.person.created).format("YYYY-MM-DDTHH:mm:ss-0300"); 


in this case i cant work using this -> 

var pessoa = angular.toJson({
person: $scope.person
});

if i try to set* $scope.person.created = 
moment($scope.person.created).format("YYYY-MM-DDTHH:mm:ss-0300"); *

it work to send, but in the view i got the display like this 

<https://lh4.googleusercontent.com/-C-ujrXh7tzE/U9MMJzdBEBI/AAAAAAAABzk/9LfjXmzBtMY/s1600/datepattern.jpg>

it remove the date previously defined 


i think its because the angular date input cant read in the isoformat



so i end with one "big" question:


is there a way to make it automatically without treating the input(for 
displaying and sending) , it just receive from the json(in iso format), 
possible to edit the date, and then return to the server in the same format 
(iso input)?


sorry bad english, hope you all understand ;)




-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to