Skip to content Skip to sidebar Skip to footer

Date Not Showing Up In Angular-bootstrap Datepicker

I have a table which conatians some dates and I am trying to use angular ui bootstrap to get a datepicker to edit them. While the datepicker pops up fine and allows me to select a

Solution 1:

Figured it out, the issue was the date data source is a string not a Date object. When you select a new data object it is written into the variable but until then it's a string and as such won't.

If you write this after the eventFixtures declaration, it will transform the dates and illustrate the issue:

for(var i = 0; i < $scope.eventFixtures.length; i++) {
        $scope.eventFixtures[i].date = new Date($scope.eventFixtures[i].date);
    }

Post a Comment for "Date Not Showing Up In Angular-bootstrap Datepicker"