To use the directive, add datetime="date-format" attribute to your input.
<input type="text" datetime="yyyy-MM-dd HH:mm:ss" ng-model="myDate">
Validation for min/max date. The min/max attribute will be used to construct the date object.
<input type="text" datetime="yyyy-MM-dd HH:mm:ss" ng-model="myDate" min="Jan 1, 2010" max="Dec 31, 2019">
You won't be able to clear this field if required. You can still set the model value to null though.
<input type="text" datetime="yyyy-MM-dd HH:mm:ss" ng-model="myDate" required>
You can use a date string instead of date object as model value.
myDate = {{myDate.model | json}}
<input type="text" datetime="medium" datetime-model="yyyy-MM-dd HH:mm:ss" ng-model="myDate">
The parser supports localizable formats in angular.