Is there a way to add 6 hours to an input date in AngularJS?
I attempted the following code:
var eventStart = new Date ($scope.event.startdateid);
var startDate = new Date ( eventStart );
startDate.setHours ( eventStart.getHours() + 6 );
event.startdateid = new Date(startDate).toJSON();
However, nothing seems to be happening...
Here is my HTML snippet:
<input type="date" name="startdateid" ng-model="event.startdateid" min="{{date | date:'yyyy-MM-dd'}}">
Could you please point out where I may have made a mistake?
Thank you!