ShatterStar
2015-12-23 08:00:40 UTC
Hi Guys,
I am trying to get the date that I have as a hidden field to be the current
date which would include the year, month and day eg. 2015-12-25, this is
how I am doing it thus far but is there a better / easier way? Here's the
code
var newDate = new Date();
dateYear = newDate.getFullYear();
dateMonth = newDate.getMonth();
dateDay = newDate.getDate();
$scope.myDate = dateYear + " " + dateMonth + " " + dateDay;
I am trying to get the date that I have as a hidden field to be the current
date which would include the year, month and day eg. 2015-12-25, this is
how I am doing it thus far but is there a better / easier way? Here's the
code
var newDate = new Date();
dateYear = newDate.getFullYear();
dateMonth = newDate.getMonth();
dateDay = newDate.getDate();
$scope.myDate = dateYear + " " + dateMonth + " " + dateDay;
--
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 angular+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
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 angular+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.