script: datepicker config
(function() {
  decko.addEditor('.date-editor', function() {
    return decko.initDatepicker($(this));
  }, function() {
    return this.val();
  });

  $.extend(decko, {
    setDatepickerConfig: function(string) {
      var setter;
      setter = function() {
        try {
          return $.parseJSON(string);
        } catch (error) {
          return {};
        }
      };
      return decko.datepickerConfig = setter();
    },
    configDatepicker: function() {
      var conf, hard_conf, user_conf;
      conf = {
        format: "YY-MM-DD"
      };
      hard_conf = {};
      user_conf = decko.datepickerConfig != null ? decko.datepickerConfig : {};
      $.extend(conf, user_conf, hard_conf);
      return conf;
    },
    initDatepicker: function(input) {
      return input.datetimepicker(decko.configDatepicker());
    }
  });

}).call(this);