describe('ddTimepicker', function () {
    var $scope,
        $sniffer,
        $document,
        $timeout,
        element;

    beforeEach(function () {
        module('dd.ui.dd-timepicker');

        inject(function ($rootScope, $compile, _$timeout_, _$sniffer_, _$document_) {
            $scope = $rootScope.$new();
            $sniffer = _$sniffer_;
            $timeout = _$timeout_;
            $document = _$document_;

            element = $compile(angular.element('<input id="time1" class="form-control" dd-timepicker type="text" ng-model="time" />'))($scope);
            $scope.$digest();

        });
    });

    describe('Change model value', function () {

        it('apply parsed user input for model', function () {

            changeInputValue(element, '8a');

            element.trigger('blur');
            $timeout.flush();

            expect($scope.time).toEqual('08:00');
        });

        it('clear model if invalid time', function () {

            changeInputValue(element, 'kepalas');

            element.trigger('blur');
            $timeout.flush();

            expect($scope.time).toBeNull();
        });

        it('do not change model if not blured', function () {
            
            $scope.time = '10:15';
            
            changeInputValue(element, '8p');

            expect($scope.time).toBe($scope.time);
        });

    });


    function changeInputValue(el, value) {
        el.val(value);
        el.trigger($sniffer.hasEvent('input') ? 'input' : 'change');
        $scope.$digest();
    }
});
@@ -103,16 +103,34 @@
 imeout,%0A
+        $compile,%0A
         
@@ -138,16 +138,16 @@
 lement;%0A
-
 %0A    bef
@@ -245,24 +245,25 @@
 tScope, 
+_
 $compile
 , _$time
@@ -254,16 +254,17 @@
 $compile
+_
 , _$time
@@ -442,16 +442,51 @@
 cument_;
+%0A            $compile = _$compile_;
 %0A%0A      
@@ -838,76 +838,8 @@
 );%0A%0A
-            element.trigger('blur');%0A            $timeout.flush();%0A%0A
     
@@ -1000,25 +1000,24 @@
 'kepalas');%0A
-%0A
             
@@ -1020,63 +1020,8 @@
     
-element.trigger('blur');%0A            $timeout.flush();%0A
 %0A   
@@ -1301,24 +1301,601 @@
 %0A        %7D);
+%0A        %0A        it('return model as Date if is-date-type=%22true%22', function () %7B%0A            %0A            $scope.time = '10:15';%0A            element = $compile(angular.element('%3Cinput id=%22time1%22 is-date-type=%22true%22 class=%22form-control%22 dd-timepicker type=%22text%22 ng-model=%22time%22 /%3E'))($scope);%0A            $scope.$digest();%0A            %0A            changeInputValue(element, '10:20');%0A            %0A            expect($scope.time instanceof Date).toBe(true);%0A            expect($scope.time.getHours()).toBe(10);%0A            expect($scope.time.getMinutes()).toBe(20);%0A        %7D);
 %0A%0A    %7D);%0A%0A%0A
@@ -2025,24 +2025,24 @@
  'change');%0A
-
         $sco
@@ -2051,21 +2051,54 @@
 .$digest();%0A
+        element.trigger('blur');%0A
     %7D%0A%7D);

add unit test for date conversion check