0

could you please tell me why date field is not display in Firefox browser . here is my code http://plnkr.co/edit/roAQ9p0wOQplFpW4adSH?p=preview On chrome it is showing 13-Sep-1997 I found the issue when I do new Date('13-Sep-1997') it gives me invalid date but chrome works fine

Thats why I added moment library .So how I will pass date object in date picker using moment js?? if it possible then we can show date in Firefox also

$scope.name = 'World';
  console.log(moment)
  var d = new Date("13-Sep-1997");
 // var d =moment("13-Sep-1997","DD-MMM-YYYY").format('DD-MMM-YYYY')
    var d2 = new Date(513938600000);

  $scope.c = {
    date: {
      date:'date',
      name: d
    }
  };
user5711656
  • 3,310
  • 4
  • 33
  • 70
  • 1
    You can use `new Date`, but for a consistent result across browsers make sure to pass the date in [ISO 8601 standard](https://nl.wikipedia.org/wiki/ISO_8601) format, like `1997-09-13` – trincot Jan 08 '19 at 21:26
  • Possible duplicate of [What are valid Date Time Strings in JavaScript?](https://stackoverflow.com/questions/51715259/what-are-valid-date-time-strings-in-javascript) – str Jan 08 '19 at 23:11

0 Answers0