-3

Hi I am new to AngularJS.

Is there anyone know how to add Date & Time picker on the form?

I saw some example which is difficult for me to follow.

Is there any simple one?

Thank in advance.

Tun Tun
  • 41
  • 9

2 Answers2

0

Just use Bootstrap with an input type of datetime-local.

<input class="form-control" type="datetime-local" value="2017-05-23T15:00:00"  id="dateTimeInput">
Mark S.
  • 3,849
  • 4
  • 20
  • 22
0
Start <input type="datetime-local"   value="" id="dateTimeInput" size="16" class="input-medium" ng-model='start.value'> 

End <input type="datetime-local"   value="" id="dateTimeInput" size="16" class="input-medium"  ng-model='end.value'>


$scope.start = {value: new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate(), new Date().getHours()+1, 0)};
$scope.end = {value: new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate(), new Date().getHours()+2, 0)};
Tun Tun
  • 41
  • 9