Online Snippets Library

angular.isDate function Example

angular.isDate function is used to check value is date or not.angular.isDate function return true if value is isDate.

Example

HTML
<!DOCTYPE html>
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.1/angular.min.js"></script>
<title>angular.isDate function Example</title>
</head>
<body ng-app >
<div>angular.isDate function Example<div> 
</body>
</html>
JavaScript
var currentDate = new Date();  
var date = "12/12/2015";  
document.write(angular.isDate(currentDate));    
document.write("</br>");  
document.write(angular.isDate(date));