Skip to content
Related Articles

Related Articles

AngularJS | angular.isDate() Function

View Discussion
Improve Article
Save Article
  • Last Updated : 12 Apr, 2019

The angular.isDate() function in AngularJS is used to determine the value of date is valid or not. It returns true if the reference is a date else false.


angular.isDate( value )

Parameters: This function accepts single parameter value which stores the date object.

Return Value: It returns true if the value passed is date else return false.

Example: This example uses angular.isDate() function to determine the value of date is valid or not.

<!DOCTYPE html>
    <title>angular.isDate() function</title>
    <script src=
<body ng-app="app" style="text-align:center">
    <h1 style="color:green">GeeksforGeeks</h1>
    <div ng-controller="geek">
        <b>Date:</b> {{ date }} <br><br>
            isDate: {{isDate}} 
    <!-- Script to uses angular.isDate() function -->
        var app = angular.module("app", []);
        app.controller('geek', ['$scope', function ($scope) {
            $ = new Date;
            $scope.isDate = angular.isDate($


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!