Skip to content

clicking doesn't close the date picker #10

Open

Description

@NullVoxPopuli

It makes me have to click the close button to get rid of the modal.

Here is how I'm invoking the date picker:

    = pick-a-date date=(readonly value) nulls-date=true on-selected=(action (mut value)) options=(readonly dateOptions)

dateOptions from the component

  dateOptions: function() {
    return {
      selectMonths: true,
      selectYears: true,
      onSet: function(context) {
        this.close();
      }
    };
  }.property()

from package.json
"ember-cli-pickadate": "1.0.0",

on page load:


DEBUG: -------------------------------
DEBUG: Ember             : 2.1.1
DEBUG: Ember Data        : 2.0.1
DEBUG: jQuery            : 2.1.4
DEBUG: Ember Simple Auth : 1.0.0
DEBUG: -------------------------------

Activity

  1. chrissloey commented on Dec 16, 2015

    @chrissloey
    Member

    I can't reproduce this. I'm using Chrome 47 and the same code you've provided. Are you still having this issue?

  2. NullVoxPopuli commented on Dec 16, 2015

    @NullVoxPopuli
    Author

    I am yeah, also on Chrome 47

  3. chrissloey commented on Apr 29, 2016

    @chrissloey
    Member

    I'm going to close this for now. There's been no more reports of this behaviour on recent versions. If anyone still gets this problem with v1.3 we can open again.

  4. mminkoff commented on May 5, 2016

    @mminkoff

    I seem to be having the same problem.

    2016-05-05 16:36:08.650 ember.debug.js:6440DEBUG: -------------------------------
    2016-05-05 16:36:08.652 ember.debug.js:6440DEBUG: Ember      : 2.5.1
    2016-05-05 16:36:08.653 ember.debug.js:6440DEBUG: Ember Data : 2.5.2
    2016-05-05 16:36:08.655 ember.debug.js:6440DEBUG: jQuery     : 2.2.3
    2016-05-05 16:36:08.655 ember.debug.js:6440DEBUG: -------------------------------
    

    "ember-cli-pickadate": "1.3.1"

    pickadateOptions: {
        disable: [
          new Date(2016,4,10)
        ],
        onSet: function(context) {
          debugger
          this.close();
        }
      }
    
    {{pick-a-date date=(readonly date) on-selected=(action (mut date)) placeholder="Pick a date" options=(readonly pickadateOptions)}}
    

    The debugger statement in the onSet function never gets called, though the date is disabled. It also doesn't close without any options set. No errors in the console. Chrome 50.

  5. chrissloey commented on May 6, 2016

    @chrissloey
    Member

    Thanks for the info! I should have time to look at it early next week. Happy to accept a PR too if you can find the problem.

  6. irawel commented on Jul 26, 2016

    @irawel

    I encountered this problem when my {{pick-a-date}} element was inside "label" element. Problem solved when i moved {{pick-a-date}} outside of "label" element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions