Q:

AngularJS input type=datetime-local: expected ISO-8601-valid date string to be a date

Using AngularJS and angular-resource 1.4.1, I have a super-simple Event service with a start date an optional end date:
angular.module('jtm.events').factory( 'Event', [
  '$resource',
  function($resource) {
    var Event = $resource( '/events/:id.json',
      {id: '@id'}
    );

    // EDIT: added this method
    Event.index = function() {
      var events = this.query();
      angular.forEach( events, function($event) {
        $event.start_date = new Date($event.start_date);
      });
      return events;
    };

    return Event;
  }
]);

A typical result of Event.query() looks like:
[
  {
    id: 1,
    start_time: "2015-08-25T00:47:16Z",
    end_time: null
    ...
  },
  ...
]

On the (end-user-facing) front-end I run these dates through a moment.js filter I set up, and that renders them as expected without any JS errors. However, on the admin Events form, I have:
<input type="datetime-local" ng-model="event.start_time" ng-required="true">

This is throwing:
Error: [ngModel:datefmt] Expected `2015-08-25T00:47:16Z` to be a date

and rendering the placeholder mm/dd/yyyy, --:-- -- mask in the admin form field.
Is this not a valid ISO 8601 date string? Do I need to change my service/module config somehow to get this to work?
Edit
Instead of defining a custom index action, I overrode the query action configuration using an intercepter to wrap the start_time string in a proper Date object:
angular.module('jtm.events').factory( 'Event', [
  '$resource',
  function($resource) {
    var Event = $resource( '/events/:id.json',
      {id: '@id'},
      {
        query: {
          action: 'query',
          isArray: true,
          transformResponse: function(response) {
            response = angular.fromJson(response);
            angular.forEach( response, function($event) {
              $event.start_time = new Date($event.start_time);
            });
            return response;
          },
        },
      }
    );

    return Event;
  }
]);

A:

you need to pass the date object in input element ng-model not the string.
use this 
start_time: new Date("2015-08-25T00:47:16Z")
ins ted of:-
start_time: "2015-08-25T00:47:16Z" 

you can take help form this link
[plnkr]:http://plnkr.co/edit/QaA31F?p=preview

