(function(ko, $, moment) {
  "use strict";

  ko.extenders.validDate = function(target, options) {
      ko.utils.validatorBase(target);

      var defaults = {
        message: ""
      };

      options = $.extend({}, defaults, options);
   
      target.validate = function validate(newValue) {
        var validatableValue  = typeof newValue === 'undefined' ? target() : newValue,
            m                 = moment(validatableValue, ["DD MM", "DD MM YY", "DD MM YYYY"]);

        if ( m === null || !m.isValid() || m.isBefore(moment().startOf('day')) ) {
          target.markInvalid(options.message);
          return false;
        }

        target.markValid();
        return true;
      };
   
      target.subscribe(target.validate);
   
      //return the original observable
      return target;
  };

})(ko, $, moment);
@@ -173,16 +173,110 @@
 sage: %22%22
+,%0A        allowBlank: true,%0A        format: 'YYYY-MM-DD',%0A        min: null,%0A        max: null
 %0A      %7D
@@ -533,126 +533,481 @@
 ue, 
-%5B%22DD MM%22, %22DD MM YY%22, %22DD MM YYYY%22%5D);%0A%0A        if ( m === null %7C%7C !m.isValid() %7C%7C m.isBefore(moment().startOf('day')) 
+options.format);%0A%0A        if (options.allowBlank && target.isBlank(validatableValue)) %7B%0A          target.markValid();%0A          return;%0A        %7D%0A%0A        if ( m === null %7C%7C !m.isValid()) %7B%0A          target.markInvalid(options.message);%0A          return false;%0A        %7D%0A        %0A        if (options.min && m.isBefore(options.min)) %7B%0A          target.markInvalid(options.message);%0A          return false;%0A        %7D%0A        %0A        if (options.max && m.isAfter(options.max)
 ) %7B%0A

Improve date validation