RobbieTheWagner / ember-flatpickr

An Ember addon that wraps the Flatpickr date picker
https://RobbieTheWagner.github.io/ember-flatpickr/
MIT License
109 stars 55 forks source link

Minimum component declaration does not work #17

Closed ghost closed 8 years ago

ghost commented 8 years ago

I can't get the basic declaration to work ( {{ember-flatpickr}} ) in ember version 2.7.0 .

  "name": "test-front",
  "version": "0.0.0",
  "description": "Small description for test-front goes here",
  "private": true,
  "directories": {
    "doc": "doc",
    "test": "tests"
  },
  "scripts": {
    "build": "ember build",
    "start": "ember server",
    "test": "ember test"
  },
  "repository": "",
  "engines": {
    "node": ">= 0.10.0"
  },
  "author": "",
  "license": "MIT",
  "devDependencies": {
    "broccoli-asset-rev": "^2.4.2",
    "ember-ajax": "^2.0.1",
    "ember-cli": "2.7.0",
    "ember-cli-app-version": "^1.0.0",
    "ember-cli-babel": "^5.1.6",
    "ember-cli-dependency-checker": "^1.2.0",
    "ember-cli-emblem": "0.8.1",
    "ember-cli-htmlbars": "^1.0.3",
    "ember-cli-htmlbars-inline-precompile": "^0.3.1",
    "ember-cli-inject-live-reload": "^1.4.0",
    "ember-cli-jshint": "^1.0.0",
    "ember-cli-legacy-blueprints": "0.1.1",
    "ember-cli-moment-shim": "2.0.0",
    "ember-cli-qunit": "^2.0.0",
    "ember-cli-release": "^0.2.9",
    "ember-cli-sass": "5.5.1",
    "ember-cli-sri": "^2.1.0",
    "ember-cli-test-loader": "^1.1.0",
    "ember-cli-uglify": "^1.2.0",
    "ember-data": "^2.7.0",
    "ember-export-application-global": "^1.0.5",
    "ember-flatpickr": "0.7.0",
    "ember-load-initializers": "^0.5.1",
    "ember-resolver": "^2.0.3",
    "ember-svg-jar": "0.9.2",
    "ember-welcome-page": "^1.0.1",
    "loader.js": "^4.0.1"
  }
}
RobbieTheWagner commented 8 years ago

@chaserkid can you elaborate on what doesn't work please? Are there errors in the console?

RobbieTheWagner commented 8 years ago

@chaserkid are you literally trying to render {{ember-flatpickr}} without passing any options? If so, that will not work.

ghost commented 8 years ago

I understand that I'm missing arguments. But the documentation doesn't provide any guidance as to the minimum. Rather, it reads: "*(All options are displayed, but they have defaults and you only need to pass what you need)". Contrast with ember pikaday, which not only has examples with options but also works as a bare component without any arguments passed in.

RobbieTheWagner commented 8 years ago

@chaserkid the only thing that is required right now, I believe, is onChange. You can set onChange=null if you don't care about it. If you look in the console, it should give you a very clear error message that you have to pass that.

ghost commented 8 years ago

Thank you. That was my problem.